Commit 41f5a7c0 authored by Barry Warsaw's avatar Barry Warsaw

builtin_map(): Nailed memory leak. PyList_Append() borrows a

reference, so you have to DECREF the appended value.  This was a fun
one!
parent 7dd809fd
......@@ -903,6 +903,7 @@ builtin_map(self, args)
if (i >= len) {
if (PyList_Append(result, value) < 0)
goto Fail_1;
Py_DECREF(value);
}
else {
if (PyList_SetItem(result, i, value) < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment