jplist: Fix memory leak that occurs when JSON parsing fails

Credit to OSS-Fuzz
This commit is contained in:
Nikias Bassen
2022-01-31 23:53:50 +01:00
parent 6fcecd0226
commit db4635a081
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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;
}