]> granicus.if.org Git - libexpat/commitdiff
Make test_alloc_realloc_attribute_enum_value() robust vs allocations
authorRhodri James <rhodri@kynesim.co.uk>
Thu, 27 Jul 2017 12:44:34 +0000 (13:44 +0100)
committerRhodri James <rhodri@kynesim.co.uk>
Thu, 27 Jul 2017 12:44:34 +0000 (13:44 +0100)
expat/tests/runtests.c

index 3ec087adb3ae903eee3b7a0de3f83730e9f60742..68de75a3047559ab3f1632dfbfe2f92124b4c4ef 100644 (file)
@@ -9050,7 +9050,9 @@ START_TEST(test_alloc_realloc_attribute_enum_value)
         if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
                                     XML_TRUE) != XML_STATUS_ERROR)
             break;
-        XML_ParserReset(parser, NULL);
+        /* See comment in test_alloc_parse_xdecl() */
+        alloc_teardown();
+        alloc_setup();
     }
     if (i == 0)
         fail("Parse succeeded despite failing reallocator");