[libvirt] [PATCH v2 2/2] lxc: Don't crash on NULL ifname_guest_actual

Guido Günther agx at sigxcpu.org
Sun Jan 11 12:51:29 UTC 2015


Reported and patch provided by Bastian Blank at

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769600
---
 src/lxc/lxc_container.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 380d136..0e6cdfd 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -472,7 +472,7 @@ lxcContainerGetNetDef(virDomainDefPtr vmDef, const char *devName)
 
     for (i = 0; i < vmDef->nnets; i++) {
         netDef = vmDef->nets[i];
-        if (STREQ(netDef->ifname_guest_actual, devName))
+        if (STREQ_NULLABLE(netDef->ifname_guest_actual, devName))
             return netDef;
     }
 
-- 
2.1.4




More information about the libvir-list mailing list