PyType_stgdict() returns a borrowed reference which must not be

Py_DECREF'd.
This commit is contained in:
Thomas Heller 2007-07-13 19:52:41 +00:00
parent 8b6a17bdeb
commit 2b78594b1f
1 changed files with 0 additions and 2 deletions

View File

@ -465,13 +465,11 @@ StructUnionType_update_stgdict(PyObject *type, PyObject *fields, int isStruct)
if (!prop) {
Py_DECREF(pair);
Py_DECREF((PyObject *)stgdict);
return -1;
}
if (-1 == PyDict_SetItem(realdict, name, prop)) {
Py_DECREF(prop);
Py_DECREF(pair);
Py_DECREF((PyObject *)stgdict);
return -1;
}
Py_DECREF(pair);