mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #24583: Fix refcount leak.
This commit is contained in:
parent
cfe5b6ca04
commit
482c05cbb5
1 changed files with 5 additions and 1 deletions
|
@ -223,9 +223,13 @@ _set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
|
|||
entry->hash = hash;
|
||||
if ((size_t)so->fill*3 < mask*2)
|
||||
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:
|
||||
Py_DECREF(key);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue