diff options
author | Thomas Heller <theller@ctypes.org> | 2007-07-13 19:52:41 +0000 |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2007-07-13 19:52:41 +0000 |
commit | 2b78594b1f5a1a876f1abd54429006f34b69cf1d (patch) | |
tree | 165fb38f1171d971f1aed5c5f19d95cec203327a | |
parent | 8b6a17bdeb8d4d7d492029cea86eb38359cd9e29 (diff) | |
download | cpython-git-2b78594b1f5a1a876f1abd54429006f34b69cf1d.tar.gz |
PyType_stgdict() returns a borrowed reference which must not be
Py_DECREF'd.
-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 5651d6260a..19e3b3c3e6 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); |