]> granicus.if.org Git - libexpat/commitdiff
Free the content model when used
authorRhodri James <rhodri@kynesim.co.uk>
Wed, 8 Feb 2017 14:27:44 +0000 (14:27 +0000)
committerSebastian Pipping <sebastian@pipping.org>
Mon, 13 Mar 2017 16:54:41 +0000 (17:54 +0100)
expat/tests/runtests.c

index 9f93c7787482bac13667535f098ab3584f71c37d..77456480064c88914a0c602dfeb8e8c7f625300e 100644 (file)
@@ -1848,7 +1848,7 @@ END_TEST
 static void XMLCALL
 entity_suspending_decl_handler(void *userData,
                                const XML_Char *UNUSED_P(name),
-                               XML_Content *UNUSED_P(model))
+                               XML_Content *model)
 {
     XML_Parser ext_parser = (XML_Parser)userData;
 
@@ -1857,6 +1857,7 @@ entity_suspending_decl_handler(void *userData,
     if (XML_GetErrorCode(ext_parser) != XML_ERROR_SUSPEND_PE)
         fail("Suspending subordinate parser get wrong code");
     XML_SetElementDeclHandler(ext_parser, NULL);
+    XML_FreeContentModel(parser, model);
 }
 
 static int XMLCALL