summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-12-06 14:34:58 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-12-06 14:34:58 (GMT)
commit2554dd993a86c7914bd7159c96b6517590a58561 (patch)
treee291d1b35bb9b189fe16215c2e29364bd447810c
parent2556f2e1e251097818dd428cc22f0633bd9ba162 (diff)
downloadcpython-2554dd993a86c7914bd7159c96b6517590a58561.zip
cpython-2554dd993a86c7914bd7159c96b6517590a58561.tar.gz
cpython-2554dd993a86c7914bd7159c96b6517590a58561.tar.bz2
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.
-rw-r--r--Modules/symtablemodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c
index 2452521..e24e72f 100644
--- a/Modules/symtablemodule.c
+++ b/Modules/symtablemodule.c
@@ -32,6 +32,7 @@ symtable_symtable(PyObject *self, PyObject *args)
if (st == NULL)
return NULL;
t = Py_BuildValue("O", st->st_symbols);
+ PyMem_Free((void *)st->st_future);
PySymtable_Free(st);
return t;
}