mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-05 19:01:18 +03:00
Fix memory leak in libxml_saveNodeTo
Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938806
This commit is contained in:
committed by
Nick Wellnhofer
parent
328456bf29
commit
d68c163723
@ -3053,6 +3053,7 @@ libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
|||||||
if (encoding != NULL) {
|
if (encoding != NULL) {
|
||||||
handler = xmlFindCharEncodingHandler(encoding);
|
handler = xmlFindCharEncodingHandler(encoding);
|
||||||
if (handler == NULL) {
|
if (handler == NULL) {
|
||||||
|
PyFile_Release(output);
|
||||||
return (PyLong_FromLong((long) -1));
|
return (PyLong_FromLong((long) -1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user