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:
Eric Hawicz
2026-07-04 11:02:06 -04:00
parent b299553de1
commit 3aa996b5b6
3 changed files with 36 additions and 2 deletions
+1
View File
@@ -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)
{