diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2022-01-20 04:41:47 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2022-01-20 17:25:36 +0100 |
commit | 0b3b2ff8839c2d00c24c466a3789eb29d12ba20b (patch) | |
tree | a147d418939a3c7d1864363b22a45c00cb95fadc | |
parent | 57c7da69b78e3698e112a6b5da19d5109b8232d1 (diff) | |
download | libexpat-git-issue-544-fix-xmlwf-memleak-on-file-opening-error.tar.gz |
xmlwf: Fix a memory leak on output file opening errorissue-544-fix-xmlwf-memleak-on-file-opening-error
-rw-r--r-- | expat/Changes | 9 | ||||
-rw-r--r-- | expat/xmlwf/xmlwf.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/expat/Changes b/expat/Changes index 7540d38c..30f1cf7c 100644 --- a/expat/Changes +++ b/expat/Changes @@ -2,6 +2,15 @@ NOTE: We are looking for help with a few things: https://github.com/libexpat/libexpat/labels/help%20wanted If you can help, please get in touch. Thanks! +Release x.x.x xxx xxxxxxx xx xxxx + Bug fixes: + #544 #545 xmlwf: Fix a memory leak on output file opening error + + Special thanks to: + hwt0415 + and + Clang LeakSan and the Clang team + Release 2.4.3 Sun January 16 2022 Security fixes: #531 #534 CVE-2021-45960 -- Fix issues with left shifts by >=29 places diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c index 29118bb6..b6f300b0 100644 --- a/expat/xmlwf/xmlwf.c +++ b/expat/xmlwf/xmlwf.c @@ -1175,9 +1175,9 @@ tmain(int argc, XML_Char **argv) { if (! userData.fp) { tperror(outName); exitCode = XMLWF_EXIT_OUTPUT_ERROR; + free(outName); + XML_ParserFree(parser); if (continueOnError) { - free(outName); - cleanupUserData(&userData); continue; } else { break; |