mirror of https://github.com/python/cpython
Fix ref/memory leak introduced in rev 41845.
This commit is contained in:
parent
538561e466
commit
50bf51a3a9
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue