re-applied the patch from Nathan Myers about a possible memory leak in
authorDaniel Veillard <veillard@src.gnome.org>
Thu, 29 Aug 2002 19:27:16 +0000 (19:27 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Thu, 29 Aug 2002 19:27:16 +0000 (19:27 +0000)
* libxslt/transform.c: re-applied the patch from Nathan Myers about
  a possible memory leak in case of error
Daniel

ChangeLog
libxslt/transform.c

index 41aa92d..27ac5a7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 29 21:26:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/transform.c: re-applied the patch from Nathan Myers about
+         a possible memory leak in case of error
+
 Wed Aug 28 13:44:54 CEST 2002 Daniel Veillard <daniel@veillard.com>
 
        * doc/Libxslt-Logo-180x168.gif doc/Libxslt-Logo-90x34.gif:
index 38c67a5..b550ee0 100644 (file)
@@ -3682,7 +3682,7 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
 error:
     if (res != NULL)
         xmlFreeDoc(res);
-    if (ctxt != NULL)
+    if ((ctxt != NULL) && (userCtxt == NULL))
         xsltFreeTransformContext(ctxt);
     return (NULL);
 }