summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-07-13 19:48:40 (GMT)
committerThomas Heller <theller@ctypes.org>2007-07-13 19:48:40 (GMT)
commit3e6cbf178b6222a9c7308709ae96fea806f7f701 (patch)
treef403931b02889e1c80ef39265c9e3e58f846f292 /Modules
parent7f162881343dd970cd133cf4a433e96e1ab24586 (diff)
downloadcpython-3e6cbf178b6222a9c7308709ae96fea806f7f701.zip
cpython-3e6cbf178b6222a9c7308709ae96fea806f7f701.tar.gz
cpython-3e6cbf178b6222a9c7308709ae96fea806f7f701.tar.bz2
For easier merging, revert ths change; it will be brought back in when
the trunk is merged.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/stgdict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_ctypes/stgdict.c b/Modules/_ctypes/stgdict.c
index b4a6e87..fd6f5e2 100644
--- a/Modules/_ctypes/stgdict.c
+++ b/Modules/_ctypes/stgdict.c
@@ -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);