]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
free cgroup_tasks_fn after use
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 7 Oct 2013 19:07:43 +0000 (14:07 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 7 Oct 2013 19:07:43 +0000 (14:07 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/cgroup.c

index 06975f26f7addcd4aeedc4ebcce622d5bfcb7063..49cc19055803ec7bd9bc33e97e7dc6ee2db8da6b 100644 (file)
@@ -1020,6 +1020,7 @@ int lxc_cgroup_enter(struct cgroup_process_info *info, pid_t pid, bool enter_sub
                }
 
                r = lxc_write_to_file(cgroup_tasks_fn, pid_buf, strlen(pid_buf), false);
+               free(cgroup_tasks_fn);
                if (r < 0) {
                        SYSERROR("Could not add pid %lu to cgroup %s: internal error", (unsigned long)pid, cgroup_path);
                        return -1;