diff options
author | Nikias Bassen | 2022-01-31 23:53:50 +0100 |
---|---|---|
committer | Nikias Bassen | 2022-01-31 23:53:50 +0100 |
commit | db4635a081b03eb9a2ea310bfb2f994fd9d4ee94 (patch) | |
tree | 272814b02879f2fd18df540b461ff1f3034c2df5 /src | |
parent | 6fcecd0226ee25e69ce049c4eba10933a0a2e944 (diff) | |
download | libplist-db4635a081b03eb9a2ea310bfb2f994fd9d4ee94.tar.gz libplist-db4635a081b03eb9a2ea310bfb2f994fd9d4ee94.tar.bz2 |
jplist: Fix memory leak that occurs when JSON parsing fails
Credit to OSS-Fuzz
Diffstat (limited to 'src')
-rw-r--r-- | src/jplist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jplist.c b/src/jplist.c index 827b367..65eb528 100644 --- a/src/jplist.c +++ b/src/jplist.c @@ -663,6 +663,7 @@ static plist_t parse_object(const char* js, jsmntok_info_t* ti, int* index) if (val) { plist_dict_set_item(obj, key, val); } else { + free(key); plist_free(obj); return NULL; } |