From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
The issue no
2309126 reported on sf.net tracker is fixed by this patch.
This patch fixes a segmentation fault in cgroup_free_controllers()
wrapper, which is generated when a Null cgroup is passed to the wrapper.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@222
4f4bb910-9a46-0410-90c8-
c897d4f1cd53
void cgroup_free_controllers(struct cgroup *cgroup)
{
int i, j;
+
+ if (!cgroup)
+ return;
+
for (i = 0; i < cgroup->index; i++) {
for (j = 0; j < cgroup->controller[i]->index; j++)
free(cgroup->controller[i]->values[j]);