]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: Don't crash on NULL ifname_guest_actual
authorGuido Günther <agx@sigxcpu.org>
Sun, 11 Jan 2015 12:51:29 +0000 (13:51 +0100)
committerCédric Bosdonnat <cbosdonnat@suse.com>
Mon, 12 Jan 2015 09:40:20 +0000 (10:40 +0100)
Reported and patch provided by Bastian Blank at

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769600

src/lxc/lxc_container.c

index 380d136d285bdabbc943f426d6fc367720f60cf3..0e6cdfd1e74c61726d0507ce2765bb7b5b75b984 100644 (file)
@@ -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;
     }