]> granicus.if.org Git - libexpat/commitdiff
runtests.c: Fix memleaks
authorSebastian Pipping <sebastian@pipping.org>
Sun, 16 Jul 2017 17:07:50 +0000 (19:07 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Sun, 16 Jul 2017 17:07:50 +0000 (19:07 +0200)
expat/tests/runtests.c

index 4c7d35209be1c18ef5237dff8e5f67a6fd105228..edfd88806dff9ae7174e82d34f9112fceb32c1b2 100644 (file)
@@ -2929,6 +2929,7 @@ external_entity_good_cdata_ascii(XML_Parser parser,
         xml_failure(ext_parser);
     CharData_CheckXMLChars(&storage, expected);
 
+    XML_ParserFree(ext_parser);
     return XML_STATUS_OK;
 }
 
@@ -3415,6 +3416,8 @@ external_entity_load_ignore(XML_Parser parser,
     if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
+
+    XML_ParserFree(ext_parser);
     return XML_STATUS_OK;
 }