need to allocate the length of both strings, plus the space added in
the sprintf, plus the terminating null byte.
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
* wish to read/modify. Add it to our cg_mount_table so that it can be manipulated
* like other "normal" controllers
*/
- controllers = malloc(strlen(ret_c) + strlen(CGROUP_FILE_PREFIX) + 1);
+ controllers = malloc(strlen(ret_c) + strlen(CGROUP_FILE_PREFIX) + 2);
if (!controllers) {
ret = ECGOTHER;
goto out;