mirror of
https://github.com/libimobiledevice/libplist.git
synced 2026-05-17 20:30:34 +00:00
jplist: Fix memory leak that occurs when JSON parsing fails
Credit to OSS-Fuzz
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{""A}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user