commit | e8d58ba6bb0c49f7e6314fdf44b88c1c850c3ca0 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Thu Nov 08 18:47:51 2007 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Thu Nov 08 18:47:51 2007 +0000 |
tree | eb4fee0e5417daf068d91a24e13aceddfc5618bf | |
parent | 1760c8a017ca87dc3b21d383542a23bca4370b34 [diff] [blame] |
Reposition the decref (spotted by eagle-eye norwitz).
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 @@ 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;