summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-07-13 19:51:55 (GMT)
committerThomas Heller <theller@ctypes.org>2007-07-13 19:51:55 (GMT)
commitfe31d77dc0b70c18f1cffa98861da3a2f995241a (patch)
tree795c4ae0504850f20701a148a4707873a6f50b7d /Modules/_ctypes
parentef4fff34351defce057bd45135341fb10557b4f3 (diff)
downloadcpython-fe31d77dc0b70c18f1cffa98861da3a2f995241a.zip
cpython-fe31d77dc0b70c18f1cffa98861da3a2f995241a.tar.gz
cpython-fe31d77dc0b70c18f1cffa98861da3a2f995241a.tar.bz2
PyType_stgdict() returns a borrowed reference which must not be
Py_DECREF'd.
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/stgdict.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c
index b72bf67..cfa72ef 100644
--- a/Modules/_ctypes/stgdict.c
+++ b/Modules/_ctypes/stgdict.c
@@ -469,13 +469,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);