mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
Patch #980082: Missing INCREF in PyType_Ready.
This commit is contained in:
parent
deacce2c87
commit
bf608750ad
@ -3143,8 +3143,10 @@ PyType_Ready(PyTypeObject *type)
|
||||
|
||||
/* Initialize tp_base (defaults to BaseObject unless that's us) */
|
||||
base = type->tp_base;
|
||||
if (base == NULL && type != &PyBaseObject_Type)
|
||||
if (base == NULL && type != &PyBaseObject_Type) {
|
||||
base = type->tp_base = &PyBaseObject_Type;
|
||||
Py_INCREF(base);
|
||||
}
|
||||
|
||||
/* Initialize the base class */
|
||||
if (base && base->tp_dict == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user