[lxc-devel] [lxc/master] cgroup: fix wrong use of cgfd_con in cgroup_exit
lifeng68 on Github
lxc-bot at linuxcontainers.org
Mon Apr 13 03:25:53 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 344 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200412/ede57580/attachment.bin>
-------------- next part --------------
From 5305cd4e7aec7310ae081a04a93d77b649bce8d8 Mon Sep 17 00:00:00 2001
From: LiFeng <lifeng68 at huawei.com>
Date: Mon, 13 Apr 2020 12:52:30 +0800
Subject: [PATCH] cgroup: fix wrong use of cgfd_con in cgroup_exit
Signed-off-by: LiFeng <lifeng68 at huawei.com>
---
src/lxc/cgroups/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/cgroups/cgroup.c b/src/lxc/cgroups/cgroup.c
index 37fd0e377d..7c94fd83b1 100644
--- a/src/lxc/cgroups/cgroup.c
+++ b/src/lxc/cgroups/cgroup.c
@@ -79,7 +79,7 @@ void cgroup_exit(struct cgroup_ops *ops)
free((*it)->container_base_path);
free((*it)->container_full_path);
free((*it)->monitor_full_path);
- if ((*it)->cgfd_mon >= 0)
+ if ((*it)->cgfd_con >= 0)
close((*it)->cgfd_con);
if ((*it)->cgfd_mon >= 0)
close((*it)->cgfd_mon);
More information about the lxc-devel
mailing list