Fixing bug #61913 removing a small memleak when running with the profiler.
authorDaniel Veillard <veillard@src.gnome.org>
Mon, 8 Oct 2001 09:29:12 +0000 (09:29 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Mon, 8 Oct 2001 09:29:12 +0000 (09:29 +0000)
* libxslt/xslt.c: Fixing bug #61913
* libxslt/transform.c: removing a small memleak when running with
  the profiler.
Daniel

ChangeLog
libxslt/transform.c
libxslt/xslt.c

index 35017ca..f0cc4f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Oct  8 11:27:52 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/xslt.c: Fixing bug #61913
+       * libxslt/transform.c: removing a small memleak when running with
+         the profiler.
+
 Sun Oct  7 18:53:34 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
 
        * libexslt/saxon.c libexslt/Makefile.am libexslt/exslt.[ch]:
index cc0761a..dc9d189 100644 (file)
@@ -271,6 +271,8 @@ xsltFreeTransformContext(xsltTransformContextPtr ctxt) {
        xmlFree(ctxt->templTab);
     if (ctxt->varsTab != NULL)
        xmlFree(ctxt->varsTab);
+    if (ctxt->profTab != NULL)
+       xmlFree(ctxt->profTab);
     xsltFreeDocuments(ctxt);
     xsltFreeCtxtExts(ctxt);
     xsltFreeGlobalVariables(ctxt);
index 62cb1bd..9a72b26 100644 (file)
@@ -1570,6 +1570,8 @@ xsltParseStylesheetTemplate(xsltStylesheetPtr style, xmlNodePtr template) {
            if (URI != NULL)
                modeURI = xmlStrdup(URI);
        }
+       ret->mode = mode;
+       ret->modeURI = modeURI;
 #ifdef WITH_XSLT_DEBUG_PARSING
        xsltGenericDebug(xsltGenericDebugContext,
             "xsltParseStylesheetTemplate: mode %s\n", mode);
@@ -1624,10 +1626,6 @@ xsltParseStylesheetTemplate(xsltStylesheetPtr style, xmlNodePtr template) {
 error:
     for (;exclPrefixes > 0;exclPrefixes--)
        exclPrefixPop(style);
-    if (mode != NULL)
-       xmlFree(mode);
-    if (modeURI != NULL)
-       xmlFree(modeURI);
 }
 
 /**