The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3352

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
This reverts commit 52520e4f793f73e5956c2d9de9c83f074622ce1d.

This can be NULL when there's a pre-start hook which fails.
From 36168a3ac4c092ac14fe47ecefabb6a1da277804 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumil...@proxmox.com>
Date: Fri, 3 Apr 2020 10:09:38 +0200
Subject: [PATCH] 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.
---
 src/lxc/start.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lxc/start.c b/src/lxc/start.c
index 9d800e30bb..a25bd0409b 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.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to