diff options
author | Guido van Rossum <guido@python.org> | 1997-01-27 21:30:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-01-27 21:30:09 (GMT) |
commit | d0eb429b8894be2eaaa63af43c68887697d46c51 (patch) | |
tree | 01a54a7c35e62e5fb6d66a992e5616fe48ee5078 /Python/ceval.c | |
parent | 950361c6cad55cb452233cbfd3d224952b6e18f2 (diff) | |
download | cpython-d0eb429b8894be2eaaa63af43c68887697d46c51.zip cpython-d0eb429b8894be2eaaa63af43c68887697d46c51.tar.gz cpython-d0eb429b8894be2eaaa63af43c68887697d46c51.tar.bz2 |
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.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 246b9a4..a59a1c9 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); |