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.
This commit is contained in:
parent
b91ffaa1d8
commit
22ed7fe906
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue