Browse Source

Add a missing json_object_get() so we don't try to use a freed object in test1.

tags/json-c-0.11-20130402
Eric Haszlakiewicz 13 years ago
parent
commit
aec876357c
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      tests/test1.c

+ 1
- 0
tests/test1.c View File

@@ -109,6 +109,7 @@ int main(int argc, char **argv)
json_object_object_add(my_object, "baz", json_object_new_string("bang"));

json_object *baz_obj = json_object_new_string("fark");
json_object_get(baz_obj);
json_object_object_add(my_object, "baz", baz_obj);
json_object_object_del(my_object, "baz");



Loading…
Cancel
Save