Commit 41c9f880 authored by Alex Martelli's avatar Alex Martelli

fixed a potential refcount bug (thanks Raymond!).

parent a70b1914
......@@ -1824,10 +1824,10 @@ builtin_sum(PyObject *self, PyObject *args)
if (PyObject_TypeCheck(result, &PyBaseString_Type)) {
PyErr_SetString(PyExc_TypeError,
"can't sum strings [use ''.join(seq) instead]");
Py_DECREF(result);
Py_DECREF(iter);
return NULL;
}
Py_INCREF(result);
}
for(;;) {
......
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