]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: make sure mount_legacy_cgroup_hierarchy() can deal with NULL root directories
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2015 10:20:26 +0000 (12:20 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2015 10:23:33 +0000 (12:23 +0200)
src/nspawn/nspawn-mount.c

index 2bca39f45d2fb8a4f4c1e3d0eb81abb91960e1de..1b1180ea353b909bb7e06e5f7999a8888528eafa 100644 (file)
@@ -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)