summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/setobject.c')
-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;