diff options
| author | Daniel Golle | 2020-11-29 23:21:04 +0000 |
|---|---|---|
| committer | Daniel Golle | 2020-11-30 00:25:47 +0000 |
| commit | f67a66f196080c483a773c153d008d989bc62a5b (patch) | |
| tree | f0a645d92e62bb1ff0b24a977a4934f17dcb19d5 | |
| parent | f3c35632a105607007c7e46da7ce51fcffe7fbe9 (diff) | |
| download | procd-f67a66f196080c483a773c153d008d989bc62a5b.tar.gz | |
jail: always call cgroups_free()
In commit 3019f50 ("jail: leak less memory") memory handling in cgroups
related code was refactored. That allows to call cgroups_free()
unconditionally and remove the child-branch of in free_opts().
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
| -rw-r--r-- | jail/jail.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/jail/jail.c b/jail/jail.c index 82ba4a5..529ac6b 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -249,6 +249,7 @@ static void free_opts(bool parent) { free_library_search(); mount_free(); + cgroups_free(); /* we need to keep argv, envp and seccomp filter in child */ if (parent) { /* parent-only */ @@ -259,9 +260,6 @@ static void free_opts(bool parent) { free_oci_envp(opts.jail_argv); free_oci_envp(opts.envp); - } else { /* child-only */ - if (opts.ocibundle) - cgroups_free(); } free_rlimits(); |