Fix refleak.

This commit is contained in:
Stefan Krah 2015-07-27 12:56:49 +02:00
parent f66f4208b7
commit c0cbed1554
1 changed files with 3 additions and 1 deletions

View File

@ -1146,8 +1146,10 @@ compiler_add_o(struct compiler *c, PyObject *dict, PyObject *o)
v = PyDict_GetItem(dict, t);
if (!v) {
if (PyErr_Occurred())
if (PyErr_Occurred()) {
Py_DECREF(t);
return -1;
}
arg = PyDict_Size(dict);
v = PyLong_FromSsize_t(arg);
if (!v) {