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

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
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment