Commit 1a8466cf authored by Guido van Rossum's avatar Guido van Rossum

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.
parent 62dba363
...@@ -1482,12 +1482,11 @@ eval_code2(co, globals, locals, ...@@ -1482,12 +1482,11 @@ eval_code2(co, globals, locals,
object *key = POP(); object *key = POP();
err = mappinginsert( err = mappinginsert(
kwdict, key, value); kwdict, key, value);
if (err) {
DECREF(key); DECREF(key);
DECREF(value); DECREF(value);
if (err)
break; break;
} }
}
if (err) { if (err) {
DECREF(args); DECREF(args);
DECREF(kwdict); DECREF(kwdict);
......
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