I sent this small patch yesterday, but it never made it to the list afaict. Resending... Regards, Jim
>From cbe8fb10add2ede6fc341a6d3e65da241c1637e3 Mon Sep 17 00:00:00 2001 From: Jim Fehlig <jfehlig@xxxxxxxx> Date: Thu, 14 Jun 2012 11:20:17 -0600 Subject: [PATCH] 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. --- src/conf/interface_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 5601d3b..0aeb1e2 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -769,7 +769,8 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType) { } def->data.bridge.delay = virXMLPropString(bridge, "delay"); ctxt->node = bridge; - virInterfaceDefParseBridge(def, ctxt); + if (virInterfaceDefParseBridge(def, ctxt) < 0) + goto error; break; } case VIR_INTERFACE_TYPE_BOND: { -- 1.7.9.2
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list