diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-02-15 13:54:55 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-02-17 17:16:51 +0100 |
commit | ac746afd33a938b6704ba32824e076af939665fb (patch) | |
tree | 3aae3e1fda4afcbdc2a35b454187b93f5e12def8 /xpath.c | |
parent | 85bc313e7996c06d52b6f6f5c6a467ff3a148e75 (diff) | |
download | libxml2-ac746afd33a938b6704ba32824e076af939665fb.tar.gz |
malloc-fail: Fix memory leak in xmlXPathTryStreamCompile
Found with libFuzzer, see #344.
Diffstat (limited to 'xpath.c')
-rw-r--r-- | xpath.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -14138,6 +14138,7 @@ xmlXPathTryStreamCompile(xmlXPathContextPtr ctxt, const xmlChar *str) { comp = xmlXPathNewCompExpr(); if (comp == NULL) { xmlXPathErrMemory(ctxt, "allocating streamable expression\n"); + xmlFreePattern(stream); return(NULL); } comp->stream = stream; |