From: Daniel P. Berrange Date: Thu, 11 Aug 2016 13:02:48 +0000 (+0100) Subject: lxc: don't try to resolve a NULL path for filesystems X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=81aa4385d7405531ab9b6d10e20c656c196197f8;p=libvirt.git lxc: don't try to resolve a NULL path for filesystems would lead to lxcContainerResolveSymlinks calling access(NULL) because it failed to check if fs->src->path was non-NULL. This is a regression caused by commit da665fbd4858890fbb3bbf5da2a7b6ca37bb3220 Author: Olga Krishtal Date: Thu Jul 14 16:52:38 2016 +0300 filesystem: adds possibility to use storage pool as fs source Signed-off-by: Olga Krishtal Signed-off-by: Daniel P. Berrange --- diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 124b4416fa..e1eb434c06 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -616,7 +616,7 @@ static int lxcContainerResolveSymlinks(virDomainFSDefPtr fs, bool gentle) { char *newroot; - if (!fs->src || fs->symlinksResolved) + if (!fs->src || !fs->src->path || fs->symlinksResolved) return 0; if (access(fs->src->path, F_OK)) {