diff options
author | Raymond Hettinger <python@rcn.com> | 2008-05-30 06:37:27 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-05-30 06:37:27 (GMT) |
commit | 65856600ed74b59d6e3428f3fd24d39d60d40bbb (patch) | |
tree | 059a6858f45c96299dbd038ae03996ded410828d /Python | |
parent | 8df4e22a2841e59fb4b7e14a846be980115605ba (diff) | |
download | cpython-65856600ed74b59d6e3428f3fd24d39d60d40bbb.zip cpython-65856600ed74b59d6e3428f3fd24d39d60d40bbb.tar.gz cpython-65856600ed74b59d6e3428f3fd24d39d60d40bbb.tar.bz2 |
Issue 2784: fix leaks in exception exit.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 4 |
1 files 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); |