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

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) ===
Signed-off-by: LiFeng <lifen...@huawei.com>
From c86a3f79cc925c17d18a82aabb8d06e6e4f258af Mon Sep 17 00:00:00 2001
From: LiFeng <lifen...@huawei.com>
Date: Tue, 14 Jan 2020 22:08:07 -0500
Subject: [PATCH] cgfsng.c: fix memeory leaks

Signed-off-by: LiFeng <lifen...@huawei.com>
---
 src/lxc/cgroups/cgfsng.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 9751fb7612..4d6d74129b 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -3000,8 +3000,11 @@ static int cg_hybrid_init(struct cgroup_ops *ops, bool 
relative, bool unprivileg
                return log_error_errno(-1, errno, "Failed to retrieve available 
legacy cgroup controllers");
 
        f = fopen("/proc/self/mountinfo", "r");
-       if (!f)
+       if (!f) {
+               free_string_list(klist);
+               free_string_list(nlist);
                return log_error_errno(-1, errno, "Failed to open 
\"/proc/self/mountinfo\"");
+       }
 
        lxc_cgfsng_print_basecg_debuginfo(basecginfo, klist, nlist);
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to