diff options
author | Christian Heimes <christian@cheimes.de> | 2013-06-29 19:03:51 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-06-29 19:03:51 (GMT) |
commit | 22ed7fe9064d3ba21abcb76fab78cf587783039b (patch) | |
tree | ef1c4d8c8a3e63e59083746a5b062c7a8206f00d /Parser | |
parent | b91ffaa1d8a0b258ff603a956b19f6f2aeeefb47 (diff) | |
download | cpython-22ed7fe9064d3ba21abcb76fab78cf587783039b.zip cpython-22ed7fe9064d3ba21abcb76fab78cf587783039b.tar.gz cpython-22ed7fe9064d3ba21abcb76fab78cf587783039b.tar.bz2 |
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.
Diffstat (limited to 'Parser')
-rw-r--r-- | Parser/pgenmain.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c index 52b8380..a624dd2 100644 --- a/Parser/pgenmain.c +++ b/Parser/pgenmain.c @@ -113,6 +113,7 @@ getgrammar(char *filename) Py_Exit(1); } g = pgen(n); + PyNode_Free(n); if (g == NULL) { printf("Bad grammar.\n"); Py_Exit(1); |