Kaydet (Commit) 482c05cb authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Issue #24583: Fix refcount leak.

üst cfe5b6ca
...@@ -223,9 +223,13 @@ _set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash) ...@@ -223,9 +223,13 @@ _set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
entry->hash = hash; entry->hash = hash;
if ((size_t)so->fill*3 < mask*2) if ((size_t)so->fill*3 < mask*2)
return 0; return 0;
return set_table_resize(so, so->used); if (!set_table_resize(so, so->used))
return 0;
Py_INCREF(key);
return -1;
found_active: found_active:
Py_DECREF(key);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment