fixed a potential refcount bug (thanks Raymond!).

This commit is contained in:
Alex Martelli 2003-04-22 09:24:48 +00:00
parent a70b19147f
commit 41c9f880d8
1 changed files with 1 additions and 1 deletions

View File

@ -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(;;) {