Commit f88db8de authored by Raymond Hettinger's avatar Raymond Hettinger

Issue 8420: Fix ref counting problem in set_repr().

parent 7276f138
......@@ -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) {
......
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