Free the memory if parsing fails