mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix ref/memory leak introduced in rev 41845.
This commit is contained in:
parent
538561e466
commit
50bf51a3a9
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue