diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-08 10:43:32 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-08 10:43:32 (GMT) |
commit | 507507473e7a83e3380885965e6fd341d2961629 (patch) | |
tree | f630b5b0c542f0b366ae1026526d56bc639403a3 | |
parent | bc07a5c9136c316383550ef38299792ab07eb167 (diff) | |
download | cpython-507507473e7a83e3380885965e6fd341d2961629.zip cpython-507507473e7a83e3380885965e6fd341d2961629.tar.gz cpython-507507473e7a83e3380885965e6fd341d2961629.tar.bz2 |
Issue #15291: Fix a memory leak where AST nodes where not properly deallocated.
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rwxr-xr-x | Parser/asdl_c.py | 1 | ||||
-rw-r--r-- | Python/Python-ast.c | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -10,6 +10,9 @@ What's New in Python 3.3.0 Beta 2? Core and Builtins ----------------- +- Issue #15291: Fix a memory leak where AST nodes where not properly + deallocated. + - Issue #15110: Fix the tracebacks generated by "import xxx" to not show the importlib stack frames. diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 769f73f..e4165b0 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -612,6 +612,7 @@ static void ast_dealloc(AST_object *self) { Py_CLEAR(self->dict); + Py_TYPE(self)->tp_free(self); } static int diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 4ca269f..60147fa 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -464,6 +464,7 @@ static void ast_dealloc(AST_object *self) { Py_CLEAR(self->dict); + Py_TYPE(self)->tp_free(self); } static int |