]> granicus.if.org Git - python/commitdiff
For easier merging, revert ths change; it will be brought back in when
authorThomas Heller <theller@ctypes.org>
Fri, 13 Jul 2007 19:48:40 +0000 (19:48 +0000)
committerThomas Heller <theller@ctypes.org>
Fri, 13 Jul 2007 19:48:40 +0000 (19:48 +0000)
the trunk is merged.

Modules/_ctypes/stgdict.c

index b4a6e87f8c4874bd8b3c82dac30421b263db0023..fd6f5e255775de31b538bbf5fa8f517f255f4bac 100644 (file)
@@ -457,11 +457,13 @@ 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);