From 6ab7e301f1854fd18891ddfeaa64e7485be990ba Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Sat, 26 Mar 2016 15:30:28 +0100 Subject: Move libxml cleanup code to a plist_cleanup method --- src/plist.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/plist.c') diff --git a/src/plist.c b/src/plist.c index d40b946..569251b 100644 --- a/src/plist.c +++ b/src/plist.c @@ -31,6 +31,24 @@ #include #include +#include +#include +#include +#include +#include +#include + +void plist_cleanup(void) +{ + /* free memory from parser initialization */ + xmlCleanupCharEncodingHandlers(); + xmlDictCleanup(); + xmlResetLastError(); + xmlCleanupGlobals(); + xmlCleanupThreads(); + xmlCleanupMemory(); +} + plist_t plist_new_node(plist_data_t data) { return (plist_t) node_create(NULL, data); -- cgit v1.1-32-gdbae