diff options
author | Bodo Möller <bodo@openssl.org> | 2011-09-05 10:25:27 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2011-09-05 10:25:27 +0000 |
commit | 61ac68f9f65e4dafb2ef5407a2d4c587d9c9f74d (patch) | |
tree | 2e9412abd7c84df0e21db86ed05a3ecdf9166791 /ssl/d1_srvr.c | |
parent | 7f1022a8b13499879b3928763787423949cf4911 (diff) |
(EC)DH memory handling fixes.
Submitted by: Adam Langley
Diffstat (limited to 'ssl/d1_srvr.c')
-rw-r--r-- | ssl/d1_srvr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 1d3805a1b4..608502d1ba 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -1031,12 +1031,11 @@ int dtls1_send_server_key_exchange(SSL *s) SSLerr(SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); goto err; } - if (!EC_KEY_up_ref(ecdhp)) + if ((ecdh = EC_KEY_dup(ecdhp)) == NULL) { SSLerr(SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB); goto err; } - ecdh = ecdhp; s->s3->tmp.ecdh=ecdh; if ((EC_KEY_get0_public_key(ecdh) == NULL) || |