Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0eb429

Browse files
committed
Plug a leak with calling something other than a function or method is
called with keyword arguments -- the keyword and value were leaked. This affected for instance with a __call__() method. Bug reported and fix supplied by Jim Fulton.
1 parent 950361c commit d0eb429

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Python/ceval.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,11 +1482,10 @@ eval_code2(co, globals, locals,
14821482
object *key = POP();
14831483
err = mappinginsert(
14841484
kwdict, key, value);
1485-
if (err) {
1486-
DECREF(key);
1487-
DECREF(value);
1485+
DECREF(key);
1486+
DECREF(value);
1487+
if (err)
14881488
break;
1489-
}
14901489
}
14911490
if (err) {
14921491
DECREF(args);

0 commit comments

Comments
 (0)