]> git.proxmox.com Git - lxc.git/blame - debian/patches/fixes/0002-Fix-the-memory-leak-in-cgfsng_attach.patch
bump version to 3.0.0-3
[lxc.git] / debian / patches / fixes / 0002-Fix-the-memory-leak-in-cgfsng_attach.patch
CommitLineData
99be5c8c
WB
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: LiFeng <lifeng68@huawei.com>
3Date: Tue, 24 Apr 2018 12:53:57 -0400
4Subject: [PATCH] Fix the memory leak in cgfsng_attach
5
6Signed-off-by: LiFeng <lifeng68@huawei.com>
7---
8 src/lxc/cgroups/cgfsng.c | 1 +
9 1 file changed, 1 insertion(+)
10
11diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
12index 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--
242.11.0
25