1
0
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:
David King 2021-07-14 15:23:11 +01:00 committed by Nick Wellnhofer
parent 328456bf29
commit d68c163723

View File

@ -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));
}
}