mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Fix memory leak in xmlCreateIOParserCtxt
Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938806
This commit is contained in:
committed by
Nick Wellnhofer
parent
f0904f3266
commit
fe564967c9
1
parser.c
1
parser.c
@@ -12625,6 +12625,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
|
||||
xmlFree(ctxt->sax);
|
||||
ctxt->sax = (xmlSAXHandlerPtr) xmlMalloc(sizeof(xmlSAXHandler));
|
||||
if (ctxt->sax == NULL) {
|
||||
xmlFreeParserInputBuffer(buf);
|
||||
xmlErrMemory(ctxt, NULL);
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
|
||||
Reference in New Issue
Block a user