Fix ref/memory leak introduced in rev 41845.

This commit is contained in:
Neal Norwitz 2006-01-02 02:46:54 +00:00
parent 538561e466
commit 50bf51a3a9
1 changed files with 2 additions and 0 deletions

View File

@ -1326,6 +1326,7 @@ mro_internal(PyTypeObject *type)
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"mro() returned a non-class ('%.500s')", "mro() returned a non-class ('%.500s')",
cls->ob_type->tp_name); cls->ob_type->tp_name);
Py_DECREF(tuple);
return -1; return -1;
} }
t = (PyTypeObject*)cls; t = (PyTypeObject*)cls;
@ -1333,6 +1334,7 @@ mro_internal(PyTypeObject *type)
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"mro() returned base with unsuitable layout ('%.500s')", "mro() returned base with unsuitable layout ('%.500s')",
t->tp_name); t->tp_name);
Py_DECREF(tuple);
return -1; return -1;
} }
} }