diff Modules/symtablemodule.c @ 21253:d024a5c72cb5 legacy-trunk

Fix [ #489673 ] memory leak in test_symtable: Free the st_future slot. The st_future slot of the symtable is not freed by PySymtable_Free() because it is shared by the symtable and compiling structs in compiel.c. Since it is shared, it is explicitly deallocated when the compiling struct is freed.
author Jeremy Hylton <jeremy@alum.mit.edu>
date Thu, 06 Dec 2001 14:34:58 +0000
parents cbc9f8865595
children f66b3a3509c7
line wrap: on
line diff
--- a/Modules/symtablemodule.c	Thu Dec 06 14:09:56 2001 +0000
+++ b/Modules/symtablemodule.c	Thu Dec 06 14:34:58 2001 +0000
@@ -32,6 +32,7 @@
 	if (st == NULL)
 		return NULL;
 	t = Py_BuildValue("O", st->st_symbols);
+	PyMem_Free((void *)st->st_future);
 	PySymtable_Free(st);
 	return t;
 }