mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 21:15:22 +00:00
Check for errors when parsing bridge interface XML
The return status of virInterfaceDefParseBridge() was not being
checked, potentially resulting in the creation of a broken
interface.
(cherry picked from commit cc004a6647
)
This commit is contained in:
parent
5814e39b32
commit
d312193630
@ -769,7 +769,8 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType) {
|
|||||||
}
|
}
|
||||||
def->data.bridge.delay = virXMLPropString(bridge, "delay");
|
def->data.bridge.delay = virXMLPropString(bridge, "delay");
|
||||||
ctxt->node = bridge;
|
ctxt->node = bridge;
|
||||||
virInterfaceDefParseBridge(def, ctxt);
|
if (virInterfaceDefParseBridge(def, ctxt) < 0)
|
||||||
|
goto error;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VIR_INTERFACE_TYPE_BOND: {
|
case VIR_INTERFACE_TYPE_BOND: {
|
||||||
|
Loading…
Reference in New Issue
Block a user