Skip to content

Commit

Permalink
Revert "start: remove unnecessary check for valid cgroup_ops"
Browse files Browse the repository at this point in the history
This reverts commit 52520e4.

This can be NULL when there's a pre-start hook which fails.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
  • Loading branch information
Blub authored and stgraber committed Apr 6, 2020
1 parent 7e67b81 commit d33bb0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lxc/start.c
Expand Up @@ -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.
Expand Down

0 comments on commit d33bb0f

Please sign in to comment.