summaryrefslogtreecommitdiff
path: root/thirdparty/openssl/crypto/dh/dh_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/openssl/crypto/dh/dh_key.c')
-rw-r--r--thirdparty/openssl/crypto/dh/dh_key.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/thirdparty/openssl/crypto/dh/dh_key.c b/thirdparty/openssl/crypto/dh/dh_key.c
index 1d80fb2c5f..387558f146 100644
--- a/thirdparty/openssl/crypto/dh/dh_key.c
+++ b/thirdparty/openssl/crypto/dh/dh_key.c
@@ -223,6 +223,8 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
goto err;
BN_CTX_start(ctx);
tmp = BN_CTX_get(ctx);
+ if (tmp == NULL)
+ goto err;
if (dh->priv_key == NULL) {
DHerr(DH_F_COMPUTE_KEY, DH_R_NO_PRIVATE_VALUE);