DECREF result of run_string
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 @@
u = w;
w = gettupleitem(u, 0);
INCREF(w);
- INCREF(w);
DECREF(u);
}
if (is_stringobject(w)) {
@@ -2657,6 +2656,7 @@
{
char *s;
int n;
+ object *v;
if (is_tupleobject(prog) && globals == None && locals == None &&
((n = gettuplesize(prog)) == 2 || n == 3)) {
@@ -2705,7 +2705,8 @@
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;
}