1
0
mirror of https://github.com/ultrajson/ultrajson.git synced 2024-11-24 05:12:02 +01:00

Corrected memory leak due to not decrementing the reference count of the

list item being replaced.
This commit is contained in:
Tim Dawborn 2015-12-28 15:46:27 +11:00
parent 0c52200eb4
commit 4c4624a7f8

@ -554,7 +554,10 @@ int SortedDict_iterNext(JSOBJ obj, JSONTypeContext *tc)
{ {
goto error; goto error;
} }
PyList_SET_ITEM(items, i, item); if (PyList_SetItem(items, i, item))
{
goto error;
}
Py_DECREF(key); Py_DECREF(key);
} }