Skip to content

Commit

Permalink
cgroups: use cleanup macro for consistency
Browse files Browse the repository at this point in the history
and to prevent future mishaps.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 26, 2021
1 parent 0d657d6 commit bdc9e48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lxc/cgroups/cgfsng.c
Expand Up @@ -3338,8 +3338,8 @@ static int cg_unified_init(struct cgroup_ops *ops, bool relative,
__do_close int cgroup_root_fd = -EBADF;
__do_free char *base_cgroup = NULL, *controllers_path = NULL;
__do_free_string_list char **delegatable = NULL;
__do_free struct hierarchy *new = NULL;
int ret;
struct hierarchy *new;

ret = unified_cgroup_hierarchy();
if (ret == -ENOMEDIUM)
Expand Down Expand Up @@ -3393,7 +3393,7 @@ static int cg_unified_init(struct cgroup_ops *ops, bool relative,
new->bpf_device_controller = 1;

ops->cgroup_layout = CGROUP_LAYOUT_UNIFIED;
ops->unified = new;
ops->unified = move_ptr(new);

return CGROUP2_SUPER_MAGIC;
}
Expand Down

0 comments on commit bdc9e48

Please sign in to comment.