xml_parser: Prevent memory leak during parse error.