From fc140e7a5c90c57b7d25dbad66ed49f3eee30aff Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Tue, 7 Jan 2020 07:22:14 -0700 Subject: [PATCH] config.c: Fix Coverity warning about uninitialized pointer read This commit resolves the following warning from Coverity: CID 1412139 (#1 of 1): Uninitialized pointer read (UNINIT)5. uninit_use_in_call: Using uninitialized value ctrl_handle when calling cgroup_get_controller_end. Signed-off-by: Tom Hromatka --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 13c7188c..48d73cae 100644 --- a/src/config.c +++ b/src/config.c @@ -1372,7 +1372,7 @@ out_error: int cgroup_unload_cgroups(void) { int error = 0; - void *ctrl_handle; + void *ctrl_handle = NULL; int ret = 0; char *curr_path = NULL; struct cgroup_mount_point info; -- 2.47.2