Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/interface_conf.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 7c2a0f162c..305a312327 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -704,14 +704,13 @@ virInterfaceDefParse(const char *xmlStr, unsigned int flags) { g_autoptr(xmlDoc) xml = NULL; - virInterfaceDef *def = NULL; - if ((xml = virXMLParse(filename, xmlStr, _("(interface_definition)"), "interface.rng", - flags & VIR_INTERFACE_DEFINE_VALIDATE))) { - def = virInterfaceDefParseNode(xml, xmlDocGetRootElement(xml)); - } + xml = virXMLParse(filename, xmlStr, _("(interface_definition)"), + "interface.rng", flags & VIR_INTERFACE_DEFINE_VALIDATE); + if (!xml) + return NULL; - return def; + return virInterfaceDefParseNode(xml, xmlDocGetRootElement(xml)); } -- 2.31.1