From: Wolfgang Bumiller Date: Fri, 3 Apr 2020 08:09:38 +0000 (+0200) Subject: Revert "start: remove unnecessary check for valid cgroup_ops" X-Git-Tag: lxc-5.0.0~470^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2aed383dee94f4788d5ce877d83089e7fdc3476;p=thirdparty%2Flxc.git Revert "start: remove unnecessary check for valid cgroup_ops" This reverts commit 52520e4f793f73e5956c2d9de9c83f074622ce1d. This can be NULL when there's a pre-start hook which fails. Signed-off-by: Wolfgang Bumiller --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 9d800e30b..a25bd0409 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -933,8 +933,10 @@ void lxc_end(struct lxc_handler *handler) lsm_process_cleanup(handler->conf, handler->lxcpath); - cgroup_ops->payload_destroy(cgroup_ops, handler); - cgroup_ops->monitor_destroy(cgroup_ops, handler); + if (cgroup_ops) { + cgroup_ops->payload_destroy(cgroup_ops, handler); + cgroup_ops->monitor_destroy(cgroup_ops, handler); + } if (handler->conf->reboot == REBOOT_NONE) { /* For all new state clients simply close the command socket.