From: Lennart Poettering Date: Wed, 30 Sep 2015 10:20:26 +0000 (+0200) Subject: nspawn: make sure mount_legacy_cgroup_hierarchy() can deal with NULL root directories X-Git-Tag: v227~55^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee30f6ac32d25b7ab975ee5c288cdefb56a83586;p=thirdparty%2Fsystemd.git nspawn: make sure mount_legacy_cgroup_hierarchy() can deal with NULL root directories --- diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index 2bca39f45d2..1b1180ea353 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -534,7 +534,7 @@ static int mount_legacy_cgroup_hierarchy(const char *dest, const char *controlle char *to; int r; - to = strjoina(dest, "/sys/fs/cgroup/", hierarchy); + to = strjoina(strempty(dest), "/sys/fs/cgroup/", hierarchy); r = path_is_mount_point(to, 0); if (r < 0 && r != -ENOENT)