Add a missing json_object_get() so we don't try to use a freed object in test1.
This commit is contained in:
1 parent
447b88a115
commit
aec876357c
1 file changed
+1
@@ -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");
|
||||
|
||||
|
||||
Reference in new issue
Block a user