Merge pull request #3352 from Blub/readd-cgroup-ops-check

Revert "start: remove unnecessary check for valid cgroup_ops"
This commit is contained in:
Christian Brauner 2020-04-03 10:28:37 +02:00 committed by GitHub
commit 514b0270ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.