diff options
author | Thomas Heller <theller@ctypes.org> | 2007-07-11 12:18:46 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-07-11 12:18:46 (GMT) |
commit | c9b9de17976a4832f505309b1096f9a7582c7be9 (patch) | |
tree | 1605a13201e35265fcaf2fde1543885617f88d4d | |
parent | 9abb96307fa707f3eb12c515cfa3407a56a33eb9 (diff) | |
download | cpython-c9b9de17976a4832f505309b1096f9a7582c7be9.zip cpython-c9b9de17976a4832f505309b1096f9a7582c7be9.tar.gz cpython-c9b9de17976a4832f505309b1096f9a7582c7be9.tar.bz2 |
PyType_stgdict() returns a borrowed reference which must not be Py_DECREF'd.
This bug should be fixed in trunk and release25-maint also.
-rw-r--r-- | Modules/_ctypes/stgdict.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c index 07e142b..c35a515 100644 --- a/Modules/_ctypes/stgdict.c +++ b/Modules/_ctypes/stgdict.c @@ -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); |