]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: remove_path_for_hierarchy()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 18:26:42 +0000 (19:26 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 14:48:37 +0000 (15:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index d1599044182d66781575a53fb784beec03b92c80..ca025268fb73c1c3f66a574f272e614b0320a5ff 100644 (file)
@@ -1736,8 +1736,12 @@ static bool create_path_for_hierarchy(struct hierarchy *h, char *cgname)
 
 static void remove_path_for_hierarchy(struct hierarchy *h, char *cgname)
 {
-       if (rmdir(h->fullcgpath) < 0)
-               SYSERROR("Failed to clean up cgroup %s from failed creation attempt", h->fullcgpath);
+       int ret;
+
+       ret = rmdir(h->fullcgpath);
+       if (ret < 0)
+               SYSERROR("Failed to rmdir(\"%s\") from failed creation attempt", h->fullcgpath);
+
        free(h->fullcgpath);
        h->fullcgpath = NULL;
 }