mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
parser: Fix memory leak in xmlInputSetEncodingHandler
Short-lived regression.
This commit is contained in:
parent
d099795611
commit
4fec0889e0
@ -1333,8 +1333,10 @@ xmlInputSetEncodingHandler(xmlParserInputPtr input,
|
||||
}
|
||||
|
||||
buf = xmlBufCreate();
|
||||
if (buf == NULL)
|
||||
if (buf == NULL) {
|
||||
xmlCharEncCloseFunc(handler);
|
||||
return(XML_ERR_NO_MEMORY);
|
||||
}
|
||||
|
||||
in->encoder = handler;
|
||||
in->raw = in->buffer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user