From fe31d77dc0b70c18f1cffa98861da3a2f995241a Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 13 Jul 2007 19:51:55 +0000 Subject: PyType_stgdict() returns a borrowed reference which must not be Py_DECREF'd. --- Modules/_ctypes/stgdict.c | 2 -- 1 file changed, 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); -- cgit v0.12