From: Kamalesh Babulal Date: Sun, 23 Apr 2023 11:35:05 +0000 (+0530) Subject: wrapper: cgroup_add_all_controllers(): fix variable typo X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Frelease-3.0;p=thirdparty%2Flibcgroup.git 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) --- 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)));