[Python-checkins] cpython: Fix resource leak in parser, free node ptr

christian.heimes python-checkins at python.org
Sat Jun 29 21:03:59 CEST 2013


http://hg.python.org/cpython/rev/117752c21072
changeset: 84377:117752c21072
user: Christian Heimes <christian at cheimes.de>
date: Sat Jun 29 21:03:51 2013 +0200
summary:
 Fix resource leak in parser, free node ptr
CID 1028068 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable n going out of scope leaks the storage it points to.
files:
 Parser/pgenmain.c | 1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -113,6 +113,7 @@
 Py_Exit(1);
 }
 g = pgen(n);
+ PyNode_Free(n);
 if (g == NULL) {
 printf("Bad grammar.\n");
 Py_Exit(1);
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /