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

index 553782e762a254161da67bb3c1bd0079010cef2e..5c9857c98c13c428bdd2ffd64a1ca61e7bd5e910 100644 (file)
@@ -2168,6 +2168,8 @@ external_entity_suspend_xmldecl(XML_Parser parser,
         if (status.parsing != XML_FINISHED)
             fail("Ext Parsing status not FINISHED");
     }
+
+    XML_ParserFree(ext_parser);
     return XML_STATUS_OK;
 }
 
@@ -2239,6 +2241,8 @@ external_entity_suspending_faulter(XML_Parser parser,
         fail(fault->fail_text);
     if (XML_GetErrorCode(ext_parser) != fault->error)
         xml_failure(ext_parser);
+
+    XML_ParserFree(ext_parser);
     return XML_STATUS_ERROR;
 }