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
1 changed files with 2 additions and 1 deletions
|
@ -336,7 +336,8 @@ ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
|
||||||
ECDSA_SIG_free(ret);
|
ECDSA_SIG_free(ret);
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
}
|
}
|
||||||
BN_CTX_end(ctx);
|
if (ctx != NULL)
|
||||||
|
BN_CTX_end(ctx);
|
||||||
BN_CTX_free(ctx);
|
BN_CTX_free(ctx);
|
||||||
BN_clear_free(kinv);
|
BN_clear_free(kinv);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue