From: Daniel Golle Date: Thu, 6 Aug 2020 14:34:27 +0000 (+0100) Subject: jail: only free cgroups if they were allocated X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=282ff0c9a610db90993d7f52cd4a19359353663c;p=project%2Fprocd.git jail: only free cgroups if they were allocated Fixes segfault on shutdown with slim containers. Signed-off-by: Daniel Golle --- diff --git a/jail/jail.c b/jail/jail.c index d59afa5..42b2d3f 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -260,7 +260,8 @@ static void free_opts(bool parent) { free(*(tmp++)); free(opts.envp); - cgroups_free(); + if (opts.ocibundle) + cgroups_free(); }; free_rlimits();