1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

malloc-fail: Fix memory leak in htmlCreatePushParserCtxt

Found with libFuzzer, see #344.
This commit is contained in:
Nick Wellnhofer
2023-02-16 14:49:06 +01:00
parent fc256953d2
commit f3e62035d8

View File

@ -6346,7 +6346,7 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
inputStream = htmlNewInputStream(ctxt);
if (inputStream == NULL) {
xmlFreeParserCtxt(ctxt);
xmlFree(buf);
xmlFreeParserInputBuffer(buf);
return(NULL);
}