diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-02-16 14:49:06 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-02-17 17:18:29 +0100 |
commit | f3e62035d8b80a6dba92639f2470f02258822a0a (patch) | |
tree | c899c401d033b0b2b6bc6d9b60e844f26cc858fa /HTMLparser.c | |
parent | fc256953d29698ba5918c32d14fc69ea69d7e64e (diff) | |
download | libxml2-f3e62035d8b80a6dba92639f2470f02258822a0a.tar.gz |
malloc-fail: Fix memory leak in htmlCreatePushParserCtxt
Found with libFuzzer, see #344.
Diffstat (limited to 'HTMLparser.c')
-rw-r--r-- | HTMLparser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/HTMLparser.c b/HTMLparser.c index 01092a3d..43f34a86 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -6346,7 +6346,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data, inputStream = htmlNewInputStream(ctxt); if (inputStream == NULL) { xmlFreeParserCtxt(ctxt); - xmlFree(buf); + xmlFreeParserInputBuffer(buf); return(NULL); } |