diff Python/symtable.c @ 21314:4d5098cfa781 legacy-trunk

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.
author Tim Peters <tim.peters@gmail.com>
date Sat, 08 Dec 2001 23:40:38 +0000
parents 485422900ef0
children 8a26bb369f53
line wrap: on
line diff
--- a/Python/symtable.c	Sat Dec 08 18:02:58 2001 +0000
+++ b/Python/symtable.c	Sat Dec 08 23:40:38 2001 +0000
@@ -15,6 +15,7 @@
 		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;
 	}