From 8297961519b3ff539bb9ce05286b022ddccb607e Mon Sep 17 00:00:00 2001 From: Siwen Yu Date: Fri, 31 Aug 2018 12:27:35 +0800 Subject: [PATCH] Fix possible memory leaks Fix #18 --- src/xml.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xml.c b/src/xml.c index 4f2a2cb..34cd770 100644 --- a/src/xml.c +++ b/src/xml.c @@ -833,6 +833,7 @@ struct xml_node* xml_easy_child(struct xml_node* node, uint8_t const* child_name /* Two children with the same name */ } else { + va_end(arguments); return 0; } } @@ -841,6 +842,7 @@ struct xml_node* xml_easy_child(struct xml_node* node, uint8_t const* child_name /* No child with that name found */ if (!next) { + va_end(arguments); return 0; } current = next;