diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2012-10-07 17:19:30 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2012-10-08 02:18:14 +0200 |
commit | dce3988f9bc81d7291d56a4d838b434cd30bb5a9 (patch) | |
tree | 89910d7c1f08907909a75fcb77aa22aa5d39b625 /eurephiadm/xsltparser.c | |
parent | 3af4f9b2bacfc8383001bba95c4f3836a6cecca6 (diff) | |
download | eurephia-dce3988f9bc81d7291d56a4d838b434cd30bb5a9.tar.gz eurephia-dce3988f9bc81d7291d56a4d838b434cd30bb5a9.tar.xz eurephia-dce3988f9bc81d7291d56a4d838b434cd30bb5a9.zip |
eurephiadm: Fixed some memory cleanup with libxml2 and libxslt
Valgrind complained about reachable buffers within the libxml2 and libxslt
functions. Found some init and cleanup functions which needed to be called
to solve this.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'eurephiadm/xsltparser.c')
-rw-r--r-- | eurephiadm/xsltparser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eurephiadm/xsltparser.c b/eurephiadm/xsltparser.c index 1168755..0538e1e 100644 --- a/eurephiadm/xsltparser.c +++ b/eurephiadm/xsltparser.c @@ -36,6 +36,7 @@ #endif #ifdef HAVE_LIBXSLT +#include <libxslt/xslt.h> #include <libxslt/xsltInternals.h> #include <libxslt/transform.h> #include <libxslt/xsltutils.h> @@ -68,6 +69,7 @@ int xslt_print_xmldoc(FILE *dst, eurephiaVALUES *cfg, xmlDoc *xmldoc, xmlStrPrintf(xsltfile,2046, (xmlChar *)"%s/%s%c", eGet_value(cfg, "eurephiadm_xslt_path"), xsltfname, 0); // Load the XSLT template + xsltInit(); xslt = xsltParseStylesheetFile(xsltfile); if( xslt == NULL ) { return 0; @@ -85,6 +87,7 @@ int xslt_print_xmldoc(FILE *dst, eurephiaVALUES *cfg, xmlDoc *xmldoc, // Clean up xmlFreeDoc(result); xsltFreeStylesheet(xslt); + xsltCleanupGlobals(); return 1; #else return 0; |