diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 82a848725..3d025c222 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -485,6 +485,9 @@ int pin_rootfs(const char *rootfs) struct stat s; int ret, fd; + if (rootfs == NULL || strlen(rootfs) == 0) + return 0; + if (!realpath(rootfs, absrootfs)) { SYSERROR("failed to get real path for '%s'", rootfs); return -1;