mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Fix refleak in super_descr_get
(#104408)
This commit is contained in:
parent
3c2992e58b
commit
a781484c8e
1 changed files with 3 additions and 1 deletions
|
@ -10277,8 +10277,10 @@ super_descr_get(PyObject *self, PyObject *obj, PyObject *type)
|
|||
return NULL;
|
||||
newobj = (superobject *)PySuper_Type.tp_new(&PySuper_Type,
|
||||
NULL, NULL);
|
||||
if (newobj == NULL)
|
||||
if (newobj == NULL) {
|
||||
Py_DECREF(obj_type);
|
||||
return NULL;
|
||||
}
|
||||
newobj->type = (PyTypeObject*)Py_NewRef(su->type);
|
||||
newobj->obj = Py_NewRef(obj);
|
||||
newobj->obj_type = obj_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue