mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +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:
parent
328456bf29
commit
d68c163723
@ -3053,6 +3053,7 @@ libxml_saveNodeTo(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
||||
if (encoding != NULL) {
|
||||
handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (handler == NULL) {
|
||||
PyFile_Release(output);
|
||||
return (PyLong_FromLong((long) -1));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user