mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue 8420: Fix ref counting problem in set_repr().
This commit is contained in:
parent
7276f138a5
commit
f88db8de76
1 changed files with 1 additions and 3 deletions
|
@ -601,10 +601,8 @@ set_repr(PySetObject *so)
|
|||
|
||||
listrepr = PyObject_Repr(keys);
|
||||
Py_DECREF(keys);
|
||||
if (listrepr == NULL) {
|
||||
Py_DECREF(keys);
|
||||
if (listrepr == NULL)
|
||||
goto done;
|
||||
}
|
||||
newsize = PyUnicode_GET_SIZE(listrepr);
|
||||
result = PyUnicode_FromUnicode(NULL, newsize);
|
||||
if (result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue