]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Check for errors when parsing bridge interface XML
authorJim Fehlig <jfehlig@suse.com>
Thu, 14 Jun 2012 17:20:17 +0000 (11:20 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 15 Jun 2012 18:08:40 +0000 (12:08 -0600)
The return status of virInterfaceDefParseBridge() was not being
checked, potentially resulting in the creation of a broken
interface.

src/conf/interface_conf.c

index 5601d3b87f7dfcc544bdcc69caa90ae07d7f7dee..0aeb1e2d1a69ea36480c97ee85522895b944183b 100644 (file)
@@ -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: {