From: Antoine Pitrou Date: Sun, 8 Jul 2012 10:43:32 +0000 (+0200) Subject: Issue #15291: Fix a memory leak where AST nodes where not properly deallocated. X-Git-Tag: v3.3.0b2~282 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=507507473e7a83e3380885965e6fd341d2961629;p=thirdparty%2FPython%2Fcpython.git Issue #15291: Fix a memory leak where AST nodes where not properly deallocated. --- diff --git a/Misc/NEWS b/Misc/NEWS index 71fead59313a..05139f2afc8c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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 769f73f0cb75..e4165b09ad1d 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 4ca269f9f542..60147fa15b4a 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