Sudhir reported a free() issue, it got traced to this issue.
https://sourceforge.net/tracker/index.php?func=detail&aid=
2049822&group_id=218421&atid=
1043649
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@150
4f4bb910-9a46-0410-90c8-
c897d4f1cd53
if (cgroup_add_value_string(cgc, ctrl_dir->d_name,
ctrl_value)) {
error = ECGFAIL;
- goto fill_error;
}
+ free(ctrl_value);
}
fill_error:
- free(ctrl_value);
free(d_name);
return error;
}
* Get the uid and gid information
*/
- control_path = strdup(path);
+ control_path = malloc(strlen(path)+strlen("tasks") + 1);
+ strcpy(control_path, path);
if (!control_path)
goto unlock_error;