Skip to content

Commit ea32d54

Browse files
RSmirnov512herbertx
authored andcommitted
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: Roman Smirnov <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 233e750 commit ea32d54

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

crypto/algboss.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
138138
goto err_free_param;
139139
}
140140

141-
if (!i)
142-
goto err_free_param;
143-
144141
param->tb[i + 1] = NULL;
145142

146143
param->type.attr.rta_len = sizeof(param->type);

0 commit comments

Comments
 (0)