Coverity reported uninitialized value:
CID 313909 (#1 of 1): Uninitialized scalar variable (UNINIT)8.
uninit_use_in_call: Using uninitialized value *info.name as argument to
%s when calling fprintf.
In cgroup_add_all_controllers(), fix the wrong variable name in the
error message, while parsing the controller name.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit
c0a166f6a217e7cd82aad125e41b352ed6b2fa47)
cgc = cgroup_add_controller(cgroup, controller);
if (!cgc) {
ret = ECGINVAL;
- fprintf(stderr, "controller %s can't be added\n", info.name);
+ fprintf(stderr, "controller %s can't be added\n", controller);
goto end;
}
} while ((controller = strtok_r(NULL, " ", &stok_buff)));