mirror of
https://github.com/openssl/openssl.git
synced 2025-04-12 20:30:52 +08:00
ecdsa_ossl: address coverity nit
BN_CTX_end() does not handle NULL input, so we must manually check before calling from the cleanup handler. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6502)
This commit is contained in:
parent
09fb65d5e4
commit
5295b99b56
@ -336,7 +336,8 @@ ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
|
||||
ECDSA_SIG_free(ret);
|
||||
ret = NULL;
|
||||
}
|
||||
BN_CTX_end(ctx);
|
||||
if (ctx != NULL)
|
||||
BN_CTX_end(ctx);
|
||||
BN_CTX_free(ctx);
|
||||
BN_clear_free(kinv);
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user