mirror of
https://github.com/json-c/json-c.git
synced 2026-04-26 23:59:06 +08:00
Issue #923: Avoid stack recursion in json_object_put() so heavily nested object trees can be freed.
This commit is contained in:
@@ -47,7 +47,10 @@ struct json_object
|
||||
json_object_to_json_string_fn *_to_json_string;
|
||||
struct printbuf *_pb;
|
||||
json_object_delete_fn *_user_delete;
|
||||
void *_userdata;
|
||||
union {
|
||||
void *_userdata;
|
||||
void *_delete_parent; // Used during json_object_put
|
||||
};
|
||||
// Actually longer, always malloc'd as some more-specific type.
|
||||
// The rest of a struct json_object_${o_type} follows
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user