Browse Source
Merge pull request #879 from janotomko/null
Handle NULL gracefully in json_tokener_free
pull/884/head
Eric Hawicz
GitHub
9 months ago
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
0 deletions
-
json_tokener.c
|
|
@@ -185,6 +185,8 @@ struct json_tokener *json_tokener_new(void) |
|
|
|
|
|
|
|
void json_tokener_free(struct json_tokener *tok) |
|
|
|
{ |
|
|
|
if (!tok) |
|
|
|
return; |
|
|
|
json_tokener_reset(tok); |
|
|
|
if (tok->pb) |
|
|
|
printbuf_free(tok->pb); |
|
|
|