summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-05-21 08:07:05 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-05-21 08:07:05 (GMT)
commit3c6b148a676f95e074b5cf6b5c7c060f65d0a16d (patch)
tree17a89d25acc241d0fe9876204bf9cdbbc37dfe67 /Python/bltinmodule.c
parent7b87f85c78ef6628db36b93629c4c698a93def3f (diff)
downloadcpython-3c6b148a676f95e074b5cf6b5c7c060f65d0a16d.zip
cpython-3c6b148a676f95e074b5cf6b5c7c060f65d0a16d.tar.gz
cpython-3c6b148a676f95e074b5cf6b5c7c060f65d0a16d.tar.bz2
SF bug #425836: Reference leak in filter().
Mark Hammond claimed that the iterized filter() forgot to decref the iterator upon return. He was right!
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index b647f3b..78e2f37 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -264,6 +264,7 @@ builtin_filter(PyObject *self, PyObject *args)
if (j < len && PyList_SetSlice(result, j, len, NULL) < 0)
goto Fail_result_it;
+ Py_DECREF(it);
return result;
Fail_result_it: