summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-12-08 23:40:38 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-12-08 23:40:38 (GMT)
commit0f2d4b84a60e6064640f09c8010dedeaa9453f14 (patch)
treec22d6dbcb414e41ce57fa5ad47be9606c1c051dc /Python
parent146483964e2e94b0d1709be438a1b86f75b5d730 (diff)
downloadcpython-0f2d4b84a60e6064640f09c8010dedeaa9453f14.zip
cpython-0f2d4b84a60e6064640f09c8010dedeaa9453f14.tar.gz
cpython-0f2d4b84a60e6064640f09c8010dedeaa9453f14.tar.bz2
PySymtableEntry_New(): I'm not sure what this routine is doing, but it
was obviously leaking an int object when whatever the heck it's looking for was found. Repaired that. This accounts for why entering function and class definitions at an interactive prompt leaked a reference to the integer 1 each time. Bugfix candidate.
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 74d2b82..33e1a57 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -15,6 +15,7 @@ PySymtableEntry_New(struct symtable *st, char *name, int type, int lineno)
goto fail;
v = PyDict_GetItem(st->st_symbols, k);
if (v) /* XXX could check that name, type, lineno match */ {
+ Py_DECREF(k);
Py_INCREF(v);
return v;
}