mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-11-23 20:53:30 +01:00
Corrected memory leak due to not decrementing the reference count of the
list item being replaced.
This commit is contained in:
parent
0c52200eb4
commit
4c4624a7f8
@ -554,7 +554,10 @@ int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc)
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
PyList_SET_ITEM(items, i, item);
|
||||
if (PyList_SetItem(items, i, item))
|
||||
{
|
||||
goto error;
|
||||
}
|
||||
Py_DECREF(key);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user