mirror of
https://github.com/json-c/json-c.git
synced 2026-09-07 16:46:50 +08:00
Issue #934: Be sure to clear _user_delete in _json_object_put_maybe_free() to avoid calling it twice. Add a test to check.
This commit is contained in:
@@ -303,6 +303,7 @@ static inline int _json_object_put_maybe_free(struct json_object *jso, int free_
|
||||
|
||||
if (jso->_user_delete)
|
||||
jso->_user_delete(jso, jso->_userdata);
|
||||
jso->_user_delete = NULL;
|
||||
|
||||
switch (jso->o_type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user