summaryrefslogtreecommitdiff
path: root/expat/xmlwf/xmlwf.c
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2022-01-20 04:41:47 +0100
committerSebastian Pipping <sebastian@pipping.org>2022-01-24 15:41:32 +0100
commit85a6f8fcdb2bc1530934f8cf684bdab86f1f2a1c (patch)
tree7e2a0a92d2a4b78df446d18c9c5c3bf1f85a9c91 /expat/xmlwf/xmlwf.c
parent178d26f50af21ec23d6e43814b9b602590b5865c (diff)
downloadlibexpat-git-85a6f8fcdb2bc1530934f8cf684bdab86f1f2a1c.tar.gz
xmlwf: Fix a memory leak on output file opening error
Diffstat (limited to 'expat/xmlwf/xmlwf.c')
-rw-r--r--expat/xmlwf/xmlwf.c4
1 files changed, 2 insertions, 2 deletions
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;