Variable procname in cgroup_change_all_cgroups() function is leaking. This patch
fixes the problem.

Signed-off-by: Peter Schiffer <pschi...@redhat.com>
---
 src/api.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/api.c b/src/api.c
index 3fa604a..cd4e5b0 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3129,6 +3129,8 @@ int cgroup_change_all_cgroups(void)
                                egid, procname, pid, CGFLAG_USECACHE);
                if (err)
                        cgroup_dbg("cgroup change pid %i failed\n", pid);
+
+               free(procname);
        }
 
        closedir(dir);


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to