Skip to content
Permalink
Browse files Browse the repository at this point in the history
cJSON: fix memory leak on object parsing error
Issue discovered during OpenSIPS Security Audit 2021/2022,
by Alfred Farrugia & Sandro Gauci (Enable Security)

GHSA-2mg2-g46r-j4qr
  • Loading branch information
rvlad-patrascu committed Mar 24, 2022
1 parent 1d60e74 commit 4175687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cJSON.c
Expand Up @@ -1483,7 +1483,7 @@ static const unsigned char *parse_object(cJSON *item, const unsigned char *value
fail:
if (item->child != NULL)
{
cJSON_Delete(child);
cJSON_Delete(item->child);
item->child = NULL;
}

Expand Down

0 comments on commit 4175687

Please sign in to comment.