diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-03-18 16:40:35 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-03-18 16:40:35 +0100 |
commit | df6dc8f69940e56b4900acd74dd6e16afc7f328b (patch) | |
tree | 6729473b2d6b6bbf30ffeb5404622663439c86d9 | |
parent | c37d30871bed83b5d2348ced14171d26371c1a17 (diff) | |
download | libxslt-df6dc8f69940e56b4900acd74dd6e16afc7f328b.tar.gz |
malloc-fail: Fix another memory leak in xsltCompileStepPattern
Found by OSS-Fuzz, see #84.
-rw-r--r-- | libxslt/pattern.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 1702f334..6e99b124 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -1581,7 +1581,6 @@ parse_node_test: xsltTransformError(NULL, NULL, NULL, "xsltCompileStepPattern : Name expected\n"); ctxt->error = 1; - xmlFree(URL); goto error; } } else { @@ -1687,6 +1686,8 @@ error: xmlFree(token); if (name != NULL) xmlFree(name); + if (URL != NULL) + xmlFree(URL); if (ret != NULL) xmlFree(ret); } |