Kaydet (Commit) 2554dd99 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

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.
üst 2556f2e1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment