]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
I tested a cgrlesengd daemon with huge load, which makes many 'su',
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Thu, 7 May 2009 20:22:46 +0000 (01:52 +0530)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Thu, 7 May 2009 20:22:46 +0000 (01:52 +0530)
commitdf06bb605d9c336e6cc60de3007b72de09dc77e5
tree9947d0fbef2fd312a0b1e528955ac32f9ba716bd
parent8953fc07c0498d1ddd9a04dc549ffb85862f4c5f
I tested a cgrlesengd daemon with huge load, which makes many 'su',
in long time. And the daemon was killed by an OOM killer. So the
daemon has memory leak. This patch fixes this problem.

The daemon allocates memory at cg_prepare_cgroup(), but it does not
free the memory. This patch adds necessary free() to cgroup_change_
cgroup_path by calling cgroup_free_controllers(). In addition, this
patch adds free()s for handling error and flushes the counters of the
allocations in cgroup_free_controllers().

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
src/api.c
src/wrapper.c