From 65856600ed74b59d6e3428f3fd24d39d60d40bbb Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 30 May 2008 06:37:27 +0000 Subject: Issue 2784: fix leaks in exception exit. --- Python/bltinmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index dbae0c9..715a108 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2305,14 +2305,14 @@ builtin_sum(PyObject *self, PyObject *args) return PyFloat_FromDouble(f_result); } if (PyFloat_CheckExact(item)) { - PyFPE_START_PROTECT("add", return 0) + PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); 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) + PyFPE_START_PROTECT("add", Py_DECREF(item); Py_DECREF(iter); return 0) f_result += (double)PyInt_AS_LONG(item); PyFPE_END_PROTECT(f_result) Py_DECREF(item); -- cgit v0.12