Commit 192c197c authored by Dan Carpenter's avatar Dan Carpenter Committed by Shuah Khan
Browse files

selftests: Uninitialized variable in test_cgcore_proc_migration()



The "c_threads" variable is used in the error handling code before it
has been initialized

Fixes: 11318989 ("selftests: cgroup: Add task migration tests")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarMichal Koutný <mkoutny@suse.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 5f70bde2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ static void *dummy_thread_fn(void *arg)
static int test_cgcore_proc_migration(const char *root)
{
	int ret = KSFT_FAIL;
	int t, c_threads, n_threads = 13;
	int t, c_threads = 0, n_threads = 13;
	char *src = NULL, *dst = NULL;
	pthread_t threads[n_threads];