mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
PyType_stgdict() returns a borrowed reference which must not be Py_DECREF'd.
This bug should be fixed in trunk and release25-maint also.
This commit is contained in:
parent
9abb96307f
commit
c9b9de1797
1 changed files with 0 additions and 2 deletions
|
@ -465,13 +465,11 @@ StructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct)
|
||||||
|
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
Py_DECREF(pair);
|
Py_DECREF(pair);
|
||||||
Py_DECREF((PyObject *)stgdict);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (-1 == PyDict_SetItem(realdict, name, prop)) {
|
if (-1 == PyDict_SetItem(realdict, name, prop)) {
|
||||||
Py_DECREF(prop);
|
Py_DECREF(prop);
|
||||||
Py_DECREF(pair);
|
Py_DECREF(pair);
|
||||||
Py_DECREF((PyObject *)stgdict);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
Py_DECREF(pair);
|
Py_DECREF(pair);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue