summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2007-11-08 18:47:51 (GMT)
committerRaymond Hettinger <python@rcn.com>2007-11-08 18:47:51 (GMT)
commite8d58ba6bb0c49f7e6314fdf44b88c1c850c3ca0 (patch)
treeeb4fee0e5417daf068d91a24e13aceddfc5618bf /Objects
parent1760c8a017ca87dc3b21d383542a23bca4370b34 (diff)
downloadcpython-e8d58ba6bb0c49f7e6314fdf44b88c1c850c3ca0.zip
cpython-e8d58ba6bb0c49f7e6314fdf44b88c1c850c3ca0.tar.gz
cpython-e8d58ba6bb0c49f7e6314fdf44b88c1c850c3ca0.tar.bz2
Reposition the decref (spotted by eagle-eye norwitz).
Diffstat (limited to 'Objects')
-rw-r--r--Objects/setobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 140d945..3cbcd9e 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1372,14 +1372,15 @@ set_isdisjoint(PySetObject *so, PyObject *other)
setentry entry;
long hash = PyObject_Hash(key);
- Py_DECREF(key);
if (hash == -1) {
+ Py_DECREF(key);
Py_DECREF(it);
return NULL;
}
entry.hash = hash;
entry.key = key;
rv = set_contains_entry(so, &entry);
+ Py_DECREF(key);
if (rv == -1) {
Py_DECREF(it);
return NULL;