From: Guido van Rossum Date: Mon, 27 Jan 1997 21:30:09 +0000 (+0000) Subject: Plug a leak with calling something other than a function or method is X-Git-Tag: v1.5a1~426 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0eb429b8894be2eaaa63af43c68887697d46c51;p=python 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. --- diff --git a/Python/ceval.c b/Python/ceval.c index 246b9a4e2c..a59a1c9d8b 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1482,11 +1482,10 @@ eval_code2(co, globals, locals, object *key = POP(); err = mappinginsert( kwdict, key, value); - if (err) { - DECREF(key); - DECREF(value); + DECREF(key); + DECREF(value); + if (err) break; - } } if (err) { DECREF(args);