Pointers should be initialized to NULL. In the multi mount test case
path, we had an uninitialized cgroup_filled which caused a
segmentation fault. Fix it for this test case.
TODO:
Fix for all test cases.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@297
4f4bb910-9a46-0410-90c8-
c897d4f1cd53
void test_cgroup_get_cgroup(int ctl1, int ctl2, int i)
{
- struct cgroup *cgroup_filled, *cgroup_a, *cgroup_b;
- struct cgroup_controller *controller;
+ struct cgroup *cgroup_filled = NULL, *cgroup_a = NULL, *cgroup_b = NULL;
+ struct cgroup_controller *controller = NULL;
char controller_name[FILENAME_MAX], control_file[FILENAME_MAX];
int ret;