Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9bda41 commit fa77e09Copy full SHA for fa77e09
1 file changed
Python/bltinmodule.c
@@ -232,8 +232,10 @@ builtin_filter(self, args)
232
goto Fail_1;
233
}
234
else {
235
+ int status = PyList_Append(result, item);
236
j++;
- if (PyList_Append(result, item) < 0)
237
+ Py_DECREF(item);
238
+ if (status < 0)
239
240
241
} else {
@@ -901,9 +903,10 @@ builtin_map(self, args)
901
903
902
904
905
if (i >= len) {
- if (PyList_Append(result, value) < 0)
- goto Fail_1;
906
+ int status = PyList_Append(result, value);
907
Py_DECREF(value);
908
909
+ goto Fail_1;
910
911
912
if (PyList_SetItem(result, i, value) < 0)
0 commit comments