Browse Source

Merge pull request #879 from janotomko/null

Handle NULL gracefully in json_tokener_free
pull/884/head
Eric Hawicz GitHub 10 months ago
parent
commit
961c31f8ed
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      json_tokener.c

+ 2
- 0
json_tokener.c View File

@@ -185,6 +185,8 @@ struct json_tokener *json_tokener_new(void)


void json_tokener_free(struct json_tokener *tok) void json_tokener_free(struct json_tokener *tok)
{ {
if (!tok)
return;
json_tokener_reset(tok); json_tokener_reset(tok);
if (tok->pb) if (tok->pb)
printbuf_free(tok->pb); printbuf_free(tok->pb);


Loading…
Cancel
Save