Commit 22ed7fe9 authored by Christian Heimes's avatar Christian Heimes

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.
parent b91ffaa1
......@@ -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);
......
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