Skip to content

Commit

Permalink
Fix possible memory leaks
Browse files Browse the repository at this point in the history
Fix #18
  • Loading branch information
yusiwen authored and ooxi committed Aug 31, 2018
1 parent e18c25c commit 8297961
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
Expand Down

0 comments on commit 8297961

Please sign in to comment.