In rsa_get_exponent() 'e' will always be a non NULL argument, no need to check for it. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- scripts/rsatoc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c index 22f0318298..afef6212d0 100644 --- a/scripts/rsatoc.c +++ b/scripts/rsatoc.c @@ -163,15 +163,10 @@ static int engine_get_pub_key(const char *key_id, EVP_PKEY **key) static int rsa_get_exponent(RSA *key, uint64_t *e) { int ret; - BIGNUM *bn_te; + BIGNUM *bn_te = NULL; const BIGNUM *key_e; uint64_t te; - bn_te = NULL; - - if (!e) - goto cleanup; - RSA_get0_key(key, NULL, &key_e, NULL); if (BN_num_bits(key_e) > 64) { ret = -EINVAL; -- 2.39.2