From a45c4873fc190859eefc821bed44f26620c6f99e Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 25 Oct 2007 02:26:58 +0000 Subject: [PATCH] Missing DECREFs --- Python/bltinmodule.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 7d5de27101c..1667d37742a 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2121,12 +2121,14 @@ builtin_sum(PyObject *self, PyObject *args) PyFPE_START_PROTECT("add", return 0) f_result += PyFloat_AS_DOUBLE(item); PyFPE_END_PROTECT(f_result) + Py_DECREF(item); continue; } if (PyInt_CheckExact(item)) { PyFPE_START_PROTECT("add", return 0) f_result += (double)PyInt_AS_LONG(item); PyFPE_END_PROTECT(f_result) + Py_DECREF(item); continue; } result = PyFloat_FromDouble(f_result);