[libvirt PATCH 03/14] virInterfaceDefDevFormat: Add missing error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/interface_conf.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index f2b3804bec..150616bda9 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -1089,13 +1089,16 @@ virInterfaceDefDevFormat(virBuffer *buf,
                 virBufferAsprintf(buf, "<mac address='%s'/>\n", def->mac);
             break;
         case VIR_INTERFACE_TYPE_BRIDGE:
-            virInterfaceBridgeDefFormat(buf, def);
+            if (virInterfaceBridgeDefFormat(buf, def) < 0)
+                return -1;
             break;
         case VIR_INTERFACE_TYPE_BOND:
-            virInterfaceBondDefFormat(buf, def);
+            if (virInterfaceBondDefFormat(buf, def) < 0)
+                return -1;
             break;
         case VIR_INTERFACE_TYPE_VLAN:
-            virInterfaceVlanDefFormat(buf, def);
+            if (virInterfaceVlanDefFormat(buf, def) < 0)
+                return -1;
             break;
     }
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux