Browse Source

Fix possible memory leaks

Fix #18
master
Siwen Yu 6 years ago
committed by ooxi
parent
commit
8297961519
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/xml.c

+ 2
- 0
src/xml.c View File

@@ -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 /* Two children with the same name
*/ */
} else { } else {
va_end(arguments);
return 0; 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 /* No child with that name found
*/ */
if (!next) { if (!next) {
va_end(arguments);
return 0; return 0;
} }
current = next; current = next;


Loading…
Cancel
Save