Skip to content

Commit

Permalink
Merge pull request #203 from timdawborn/sort_keys_memory_leak
Browse files Browse the repository at this point in the history
Corrected memory leak in sort_keys=True
  • Loading branch information
Jahaja committed Jan 15, 2016
2 parents 2033cfc + 4c4624a commit 8c0edfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/objToJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8c0edfb

Please sign in to comment.