From: Guido Günther Date: Sun, 11 Jan 2015 12:51:29 +0000 (+0100) Subject: lxc: Don't crash on NULL ifname_guest_actual X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=906a116586eeac0dd0b34f5ec89d2f6b3ff8c217;p=libvirt.git lxc: Don't crash on NULL ifname_guest_actual Reported and patch provided by Bastian Blank at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769600 --- diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 380d136d28..0e6cdfd1e7 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; }