mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Fix memory leak in xmlNewInputFromFile
Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938806
This commit is contained in:
parent
fe564967c9
commit
328456bf29
@ -1546,8 +1546,10 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
|
||||
}
|
||||
|
||||
inputStream = xmlNewInputStream(ctxt);
|
||||
if (inputStream == NULL)
|
||||
if (inputStream == NULL) {
|
||||
xmlFreeParserInputBuffer(buf);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
inputStream->buf = buf;
|
||||
inputStream = xmlCheckHTTPInput(ctxt, inputStream);
|
||||
|
Loading…
x
Reference in New Issue
Block a user