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: 11318989c3
("selftests: cgroup: Add task migration tests")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
5f70bde26a
commit
192c197cbc
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in New Issue