Browse Source
Merge pull request #722 from imaami/fix-json_tokener_new_ex-use-after-free
Fix use-after-free in json_tokener_new_ex()
tags/json-c-0.16-20220414
Eric Hawicz
GitHub
4 years ago
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
json_tokener.c
|
|
|
@@ -164,8 +164,8 @@ struct json_tokener *json_tokener_new_ex(int depth) |
|
|
|
tok->pb = printbuf_new(); |
|
|
|
if (!tok->pb) |
|
|
|
{ |
|
|
|
free(tok); |
|
|
|
free(tok->stack); |
|
|
|
free(tok); |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
tok->max_depth = depth; |
|
|
|
|