summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-03-15 14:28:14 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2023-03-15 15:32:09 +0100
commitac9d752240d399db1d7c09f2ef4008200a272c8c (patch)
tree1289b0fb7b8266c9ee8279c83f808a64f0f2cac0
parentf13329a622f0370bf1eb72ef99229e8faf46f732 (diff)
downloadlibxslt-ac9d752240d399db1d7c09f2ef4008200a272c8c.tar.gz
malloc-fail: Fix double free in xsltCompMatchAdd
Found by OSS-Fuzz, see #84.
-rw-r--r--libxslt/pattern.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libxslt/pattern.c b/libxslt/pattern.c
index 81655660..00298392 100644
--- a/libxslt/pattern.c
+++ b/libxslt/pattern.c
@@ -311,10 +311,6 @@ xsltCompMatchAdd(xsltParserContextPtr ctxt, xsltCompMatchPtr comp,
"xsltCompMatchAdd: memory re-allocation failure.\n");
if (ctxt->style != NULL)
ctxt->style->errors++;
- if (value)
- xmlFree(value);
- if (value2)
- xmlFree(value2);
return (-1);
}
comp->maxStep *= 2;