提交 9bcbc52e 编写于 作者: J Jiri Denemark

conf: Add cleanup label to virDomainDefParse

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 5ae24a13
......@@ -21517,16 +21517,18 @@ virDomainDefParse(const char *xmlStr,
void *parseOpaque,
unsigned int flags)
{
xmlDocPtr xml;
xmlDocPtr xml = NULL;
virDomainDefPtr def = NULL;
int keepBlanksDefault = xmlKeepBlanksDefault(0);
if ((xml = virXMLParse(filename, xmlStr, _("(domain_definition)")))) {
if (!(xml = virXMLParse(filename, xmlStr, _("(domain_definition)"))))
goto cleanup;
def = virDomainDefParseNode(xml, xmlDocGetRootElement(xml), caps,
xmlopt, parseOpaque, flags);
xmlFreeDoc(xml);
}
cleanup:
xmlFreeDoc(xml);
xmlKeepBlanksDefault(keepBlanksDefault);
return def;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册