Corrected some memory leaks in parser.c