From 1d24c616ef2cb5c22ed066bba83cf796adc7181b Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Sun, 23 Apr 2023 17:05:05 +0530 Subject: [PATCH] wrapper: cgroup_add_all_controllers(): fix variable typo 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 Signed-off-by: Tom Hromatka (cherry picked from commit c0a166f6a217e7cd82aad125e41b352ed6b2fa47) --- src/wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapper.c b/src/wrapper.c index 7301ab86..e01a0c9d 100644 --- a/src/wrapper.c +++ b/src/wrapper.c @@ -170,7 +170,7 @@ int cgroup_add_all_controllers(struct cgroup *cgroup) 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))); -- 2.47.2