From 9da198631b71d03fc1de41b7330e1581e2d27f1e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 12 Jun 2015 20:22:54 -0700 Subject: [PATCH] more xml2 leak fixes --- test/cleanup.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/cleanup.hpp b/test/cleanup.hpp index 9c438b34b..264a6b559 100644 --- a/test/cleanup.hpp +++ b/test/cleanup.hpp @@ -2,6 +2,9 @@ #define TEST_MEMORY_CLEANUP #include +#include +#include + #if defined(HAVE_CAIRO) #include #endif @@ -13,13 +16,19 @@ namespace testing { -void run_cleanup() +inline void run_cleanup() { // only call this once, on exit // to make sure valgrind output is clean // http://xmlsoft.org/xmlmem.html xmlCleanupCharEncodingHandlers(); + xmlCleanupEncodingAliases(); + xmlCleanupGlobals(); xmlCleanupParser(); + xmlCleanupThreads(); + xmlCleanupInputCallbacks(); + xmlCleanupOutputCallbacks(); + xmlCleanupMemory(); #if defined(HAVE_CAIRO) // http://cairographics.org/manual/cairo-Error-handling.html#cairo-debug-reset-static-data