From 2b78594b1f5a1a876f1abd54429006f34b69cf1d Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 13 Jul 2007 19:52:41 +0000 Subject: [PATCH] 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 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); -- 2.50.1