diff options
author | Alex Martelli <aleaxit@gmail.com> | 2003-04-22 09:24:48 (GMT) |
---|---|---|
committer | Alex Martelli <aleaxit@gmail.com> | 2003-04-22 09:24:48 (GMT) |
commit | 41c9f880d8bf59e80b6ca5963c3e9e2b17386736 (patch) | |
tree | 1db466aef80343560c541f3299fa19724ddc6914 | |
parent | a70b19147fd163744be34745d393af7be603629f (diff) | |
download | cpython-41c9f880d8bf59e80b6ca5963c3e9e2b17386736.zip cpython-41c9f880d8bf59e80b6ca5963c3e9e2b17386736.tar.gz cpython-41c9f880d8bf59e80b6ca5963c3e9e2b17386736.tar.bz2 |
fixed a potential refcount bug (thanks Raymond!).
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 0eb8357..6c1a3d2 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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(;;) { |