From: Lennart Poettering Date: Mon, 8 Apr 2013 17:42:58 +0000 (+0200) Subject: cgroup: clean-ups X-Git-Tag: v201~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2d76d14ea3682c1c144001449654eb0c6bbda08d cgroup: clean-ups --- diff --git a/src/core/execute.c b/src/core/execute.c index dddef1451..5083af9ae 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1547,8 +1547,7 @@ int exec_spawn(ExecCommand *command, * outside of the cgroup) and in the parent (so that we can be * sure that when we kill the cgroup the process will be * killed too). */ - if (cgroup_bondings) - cgroup_bonding_install_list(cgroup_bondings, pid, cgroup_suffix); + cgroup_bonding_install_list(cgroup_bondings, pid, cgroup_suffix); exec_status_start(&command->exec_status, pid); diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 3738ca8ea..c17e1d4d1 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -697,7 +697,13 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { return write_string_file(fs, c); } -int cg_set_group_access(const char *controller, const char *path, mode_t mode, uid_t uid, gid_t gid) { +int cg_set_group_access( + const char *controller, + const char *path, + mode_t mode, + uid_t uid, + gid_t gid) { + _cleanup_free_ char *fs = NULL; int r;