Commit 50bf51a3 authored by Neal Norwitz's avatar Neal Norwitz

Fix ref/memory leak introduced in rev 41845.

parent 538561e4
......@@ -1326,6 +1326,7 @@ mro_internal(PyTypeObject *type)
PyErr_Format(PyExc_TypeError,
"mro() returned a non-class ('%.500s')",
cls->ob_type->tp_name);
Py_DECREF(tuple);
return -1;
}
t = (PyTypeObject*)cls;
......@@ -1333,6 +1334,7 @@ mro_internal(PyTypeObject *type)
PyErr_Format(PyExc_TypeError,
"mro() returned base with unsuitable layout ('%.500s')",
t->tp_name);
Py_DECREF(tuple);
return -1;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment