From 8011dacb794d99995b6b42a5a552838b9b905398 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 29 Aug 2002 19:27:16 +0000 Subject: [PATCH] re-applied the patch from Nathan Myers about a possible memory leak in * libxslt/transform.c: re-applied the patch from Nathan Myers about a possible memory leak in case of error Daniel --- ChangeLog | 5 +++++ libxslt/transform.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 41aa92d..27ac5a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 29 21:26:30 CEST 2002 Daniel Veillard + + * 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 * doc/Libxslt-Logo-180x168.gif doc/Libxslt-Logo-90x34.gif: diff --git a/libxslt/transform.c b/libxslt/transform.c index 38c67a5..b550ee0 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -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); } -- 2.7.4