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

[libvirt] [PATCH 3/5] interface: Need to check ifacedef->mac not just ifacedef after strdup()



---
 src/interface/interface_backend_udev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index 10b8a5d..d259043 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -577,7 +577,7 @@ udevIfaceGetIfaceDef(struct udev *udev, char *name)
 
     /* MAC address */
     ifacedef->mac = strdup(udev_device_get_sysattr_value(dev, "address"));
-    if (!ifacedef) {
+    if (!ifacedef->mac) {
         virReportOOMError();
         goto cleanup;
     }
-- 
1.7.11.7


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