mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
fixed a potential refcount bug (thanks Raymond!).
This commit is contained in:
parent
a70b19147f
commit
41c9f880d8
1 changed files with 1 additions and 1 deletions
|
|
@ -1824,10 +1824,10 @@ builtin_sum(PyObject *self, PyObject *args)
|
||||||
if (PyObject_TypeCheck(result, &PyBaseString_Type)) {
|
if (PyObject_TypeCheck(result, &PyBaseString_Type)) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"can't sum strings [use ''.join(seq) instead]");
|
"can't sum strings [use ''.join(seq) instead]");
|
||||||
Py_DECREF(result);
|
|
||||||
Py_DECREF(iter);
|
Py_DECREF(iter);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Py_INCREF(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue