Commit a05c821e authored by Jia Jie Ho's avatar Jia Jie Ho Committed by Herbert Xu

crypto: starfive - Skip unneeded key free

Skip unneeded kfree_sensitive if RSA module is using falback algo.
Signed-off-by: default avatarJia Jie Ho <jiajie.ho@starfivetech.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b6e9eb69
...@@ -45,6 +45,9 @@ static inline int starfive_pka_wait_done(struct starfive_cryp_ctx *ctx) ...@@ -45,6 +45,9 @@ static inline int starfive_pka_wait_done(struct starfive_cryp_ctx *ctx)
static void starfive_rsa_free_key(struct starfive_rsa_key *key) static void starfive_rsa_free_key(struct starfive_rsa_key *key)
{ {
if (!key->key_sz)
return;
kfree_sensitive(key->d); kfree_sensitive(key->d);
kfree_sensitive(key->e); kfree_sensitive(key->e);
kfree_sensitive(key->n); kfree_sensitive(key->n);
......
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