]> git.proxmox.com Git - lxc.git/blob - debian/patches/fixes/0002-Fix-the-memory-leak-in-cgfsng_attach.patch
04e258f35795ee986feb323712b4268628366df5
[lxc.git] / debian / patches / fixes / 0002-Fix-the-memory-leak-in-cgfsng_attach.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: LiFeng <lifeng68@huawei.com>
3 Date: Tue, 24 Apr 2018 12:53:57 -0400
4 Subject: [PATCH] Fix the memory leak in cgfsng_attach
5
6 Signed-off-by: LiFeng <lifeng68@huawei.com>
7 ---
8 src/lxc/cgroups/cgfsng.c | 1 +
9 1 file changed, 1 insertion(+)
10
11 diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
12 index b48f997f..689e4fe5 100644
13 --- a/src/lxc/cgroups/cgfsng.c
14 +++ b/src/lxc/cgroups/cgfsng.c
15 @@ -2549,6 +2549,7 @@ static bool cgfsng_attach(const char *name, const char *lxcpath, pid_t pid)
16 continue;
17
18 fullpath = build_full_cgpath_from_monitorpath(h, path, "cgroup.procs");
19 + free(path);
20 ret = lxc_write_to_file(fullpath, pidstr, len, false);
21 if (ret < 0) {
22 SYSERROR("Failed to attach %d to %s", (int)pid, fullpath);
23 --
24 2.11.0
25