From 906a116586eeac0dd0b34f5ec89d2f6b3ff8c217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sun, 11 Jan 2015 13:51:29 +0100 Subject: [PATCH] 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 --- 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 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; } -- GitLab