mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
virDomainNetDefParseXML: Don't overload 'node' variable when parsing <coalesce>
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c3c7d0aacb
commit
3d81ed1448
@ -8994,6 +8994,7 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
|
||||
xmlNodePtr bandwidth_node = NULL;
|
||||
xmlNodePtr mac_node = NULL;
|
||||
xmlNodePtr target_node = NULL;
|
||||
xmlNodePtr coalesce_node = NULL;
|
||||
VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
int rv;
|
||||
g_autofree char *macaddr = NULL;
|
||||
@ -9410,9 +9411,8 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
node = virXPathNode("./coalesce", ctxt);
|
||||
if (node) {
|
||||
if (virDomainNetDefCoalesceParseXML(node, ctxt, &def->coalesce) < 0)
|
||||
if ((coalesce_node = virXPathNode("./coalesce", ctxt))) {
|
||||
if (virDomainNetDefCoalesceParseXML(coalesce_node, ctxt, &def->coalesce) < 0)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user