diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-02-14 15:13:06 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-02-17 17:16:51 +0100 |
commit | c82701ff0b24bc56c6814e690198599cfc8c273a (patch) | |
tree | 61de7cdb992300188ded5dd85726f8b93a67d69d /xmlsave.c | |
parent | 97086fd76b21fee6e41c13921c450411442d9da6 (diff) | |
download | libxml2-c82701ff0b24bc56c6814e690198599cfc8c273a.tar.gz |
malloc-fail: Fix memory leak in xmlDocDumpFormatMemoryEnc
Found with libFuzzer, see #344.
Diffstat (limited to 'xmlsave.c')
-rw-r--r-- | xmlsave.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; } |