use rsa_free() on error in rsa_make_key()
This commit is contained in:
parent
749873c306
commit
68bf547f9c
@ -97,7 +97,7 @@ int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key)
|
|||||||
err = CRYPT_OK;
|
err = CRYPT_OK;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
errkey:
|
errkey:
|
||||||
mp_clear_multi(key->q, key->p, key->qP, key->dP, key->dQ, key->N, key->d, key->e, NULL);
|
rsa_free(key);
|
||||||
cleanup:
|
cleanup:
|
||||||
mp_clear_multi(tmp3, tmp2, tmp1, q, p, NULL);
|
mp_clear_multi(tmp3, tmp2, tmp1, q, p, NULL);
|
||||||
return err;
|
return err;
|
||||||
|
Loading…
Reference in New Issue
Block a user