Skip to content
Snippets Groups Projects
Commit ea32d547 authored by Roman Smirnov's avatar Roman Smirnov Committed by Herbert Xu
Browse files

crypto: algboss - remove NULL check in cryptomgr_schedule_probe()


The for loop will be executed at least once, so i > 0. If the loop
is interrupted before i is incremented (e.g., when checking len for NULL),
i will not be checked.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Signed-off-by: default avatarRoman Smirnov <r.smirnov@omp.ru>
Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 233e7505
No related branches found
No related tags found
No related merge requests found
...@@ -138,9 +138,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval) ...@@ -138,9 +138,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
goto err_free_param; goto err_free_param;
} }
if (!i)
goto err_free_param;
param->tb[i + 1] = NULL; param->tb[i + 1] = NULL;
param->type.attr.rta_len = sizeof(param->type); param->type.attr.rta_len = sizeof(param->type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment