parser: fix memory leak when parsing tokens

Signed-off-by: Alberto Corona <alberto@0x1a.us>