summaryrefslogtreecommitdiff
path: root/libxslt/xslt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxslt/xslt.c')
-rw-r--r--libxslt/xslt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libxslt/xslt.c b/libxslt/xslt.c
index 12489640..55ccca3d 100644
--- a/libxslt/xslt.c
+++ b/libxslt/xslt.c
@@ -1313,8 +1313,10 @@ xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
if (elements != NULL) {
if (style->cdataSection == NULL)
style->cdataSection = xmlHashCreate(10);
- if (style->cdataSection == NULL)
+ if (style->cdataSection == NULL) {
+ xmlFree(elements);
return;
+ }
element = elements;
while (*element != 0) {