Remove memory leak in external_entity_optioner()

This commit is contained in:
Rhodri James 2017-07-27 11:50:15 +01:00
parent ebe390bab0
commit d16a581849

View File

@ -339,16 +339,16 @@ external_entity_optioner(XML_Parser parser,
while (options->parse_text != NULL) {
if (!strcmp(systemId, options->system_id)) {
enum XML_Status rc;
ext_parser =
XML_ExternalEntityParserCreate(parser, context, NULL);
if (ext_parser == NULL)
return XML_STATUS_ERROR;
if (_XML_Parse_SINGLE_BYTES(ext_parser, options->parse_text,
rc = _XML_Parse_SINGLE_BYTES(ext_parser, options->parse_text,
strlen(options->parse_text),
XML_TRUE) == XML_STATUS_ERROR)
return XML_STATUS_ERROR;
XML_TRUE);
XML_ParserFree(ext_parser);
return XML_STATUS_OK;
return rc;
}
options++;
}