Reposition the decref (spotted by eagle-eye norwitz).
This commit is contained in:
parent
1760c8a017
commit
e8d58ba6bb
|
@ -1372,14 +1372,15 @@ set_isdisjoint(PySetObject *so, PyObject *other)
|
||||||
setentry entry;
|
setentry entry;
|
||||||
long hash = PyObject_Hash(key);
|
long hash = PyObject_Hash(key);
|
||||||
|
|
||||||
Py_DECREF(key);
|
|
||||||
if (hash == -1) {
|
if (hash == -1) {
|
||||||
|
Py_DECREF(key);
|
||||||
Py_DECREF(it);
|
Py_DECREF(it);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
entry.hash = hash;
|
entry.hash = hash;
|
||||||
entry.key = key;
|
entry.key = key;
|
||||||
rv = set_contains_entry(so, &entry);
|
rv = set_contains_entry(so, &entry);
|
||||||
|
Py_DECREF(key);
|
||||||
if (rv == -1) {
|
if (rv == -1) {
|
||||||
Py_DECREF(it);
|
Py_DECREF(it);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue