mirror of
https://github.com/json-c/json-c.git
synced 2026-03-22 06:29:06 +08:00
Add a missing json_object_get() so we don't try to use a freed object in test1.
This commit is contained in:
@@ -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