[Python-checkins] CVS: python/dist/src/Modules symtablemodule.c,1.4,1.5

Jeremy Hylton jhylton@users.sourceforge.net
Thu, 06 Dec 2001 06:35:00 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv7975

Modified Files:
	symtablemodule.c 
Log Message:
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.



Index: symtablemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/symtablemodule.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** symtablemodule.c	2001/04/16 18:42:13	1.4
--- symtablemodule.c	2001/12/06 14:34:58	1.5
***************
*** 33,36 ****
--- 33,37 ----
  		return NULL;
  	t = Py_BuildValue("O", st->st_symbols);
+ 	PyMem_Free((void *)st->st_future);
  	PySymtable_Free(st);
  	return t;