diff options
author | Guido van Rossum <guido@python.org> | 1995-02-07 15:36:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-07 15:36:56 (GMT) |
commit | 6b6e0aafe52c321e492d8f0d7825d626a8c45000 (patch) | |
tree | d3ed9555d50151f6734cd5c4942b0aef053e70d7 /Python/ceval.c | |
parent | 0b3449010e15a08977e669cfdb8146bb789a5809 (diff) | |
download | cpython-6b6e0aafe52c321e492d8f0d7825d626a8c45000.zip cpython-6b6e0aafe52c321e492d8f0d7825d626a8c45000.tar.gz cpython-6b6e0aafe52c321e492d8f0d7825d626a8c45000.tar.bz2 |
DECREF result of run_string
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index ff055e4..48fce5b 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -782,7 +782,6 @@ eval_code(co, globals, locals, owner, arg) u = w; w = gettupleitem(u, 0); INCREF(w); - INCREF(w); DECREF(u); } if (is_stringobject(w)) { @@ -2657,6 +2656,7 @@ exec_statement(prog, globals, locals) { char *s; int n; + object *v; if (is_tupleobject(prog) && globals == None && locals == None && ((n = gettuplesize(prog)) == 2 || n == 3)) { @@ -2705,7 +2705,8 @@ exec_statement(prog, globals, locals) err_setstr(ValueError, "embedded '\\0' in exec string"); return -1; } - if (run_string(s, file_input, globals, locals) == NULL) + if ((v = run_string(s, file_input, globals, locals)) == NULL) return -1; + DECREF(v); return 0; } |