Browse Source

fix json_object_new_string() segfault if *s == NULL

pull/30/head
MATSUMOTO Ryosuke 13 years ago
parent
commit
4d70844730
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      json_object.c

+ 1
- 0
json_object.c View File

@@ -523,6 +523,7 @@ static void json_object_string_delete(struct json_object* jso)

struct json_object* json_object_new_string(const char *s)
{
if(!s) return NULL;
struct json_object *jso = json_object_new(json_type_string);
if(!jso) return NULL;
jso->_delete = &json_object_string_delete;


Loading…
Cancel
Save