From: Raymond Hettinger Date: Thu, 8 Nov 2007 18:47:51 +0000 (+0000) Subject: Reposition the decref (spotted by eagle-eye norwitz). X-Git-Tag: v2.6a1~1077 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8d58ba6bb0c49f7e6314fdf44b88c1c850c3ca0;p=python Reposition the decref (spotted by eagle-eye norwitz). --- diff --git a/Objects/setobject.c b/Objects/setobject.c index 140d9456ee..3cbcd9ec8c 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;