From e99ee0decc02cd304b3173bbd321fee628570f87 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Tue, 31 Jul 2012 16:04:33 +0200 Subject: [PATCH] don't try to pin a null rootfs. Signed-off-by: Serge Hallyn Signed-off-by: Daniel Lezcano --- src/lxc/conf.c | 3 +++ 1 file changed, 3 insertions(+) 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;