提交 5295b99b 编写于 作者: B Benjamin Kaduk

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: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6502)
上级 09fb65d5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册