1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-25 10:50:08 +03:00

malloc-fail: Fix memory leak in xmlDocDumpFormatMemoryEnc

Found with libFuzzer, see #344.
This commit is contained in:
Nick Wellnhofer 2023-02-14 15:13:06 +01:00
parent 97086fd76b
commit c82701ff0b

View File

@ -2363,6 +2363,7 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
if ((out_buff = xmlAllocOutputBuffer(conv_hdlr)) == NULL ) {
xmlSaveErrMemory("creating buffer");
xmlCharEncCloseFunc(conv_hdlr);
return;
}