summaryrefslogtreecommitdiffstats
path: root/src/plist.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-06-15 14:18:09 +0200
committerGravatar Nikias Bassen2023-06-15 14:18:09 +0200
commit2d8d7ef272db06783989f77ba1ed80aa0f4d2dfd (patch)
tree652eb96f74f82a77791cf5756db8d947eaf48e04 /src/plist.c
parentf28cf0f1e51c7554d590cbec56abac46b4a44b4e (diff)
downloadlibplist-2d8d7ef272db06783989f77ba1ed80aa0f4d2dfd.tar.gz
libplist-2d8d7ef272db06783989f77ba1ed80aa0f4d2dfd.tar.bz2
Plug memory leak in plist_write_to_stream()
Thanks @beyonik for pointing this out!
Diffstat (limited to 'src/plist.c')
-rw-r--r--src/plist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plist.c b/src/plist.c
index d78f748..19279ed 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -1692,6 +1692,7 @@ plist_err_t plist_write_to_stream(plist_t plist, FILE *stream, plist_format_t fo
if (fwrite(output, 1, length, stream) < length) {
err = PLIST_ERR_IO;
}
+ free(output);
}
return err;
}