Fix double-free in OpenSSL's SSL ECDH code.

It has yet to be determined if this warrants a FreeBSD Security
Advisory, but we might as well get it fixed in the normal branches.

Obtained from:	OpenSSL CVS
Security:	CVE-2010-2939
X-MFC after:	Not long...
This commit is contained in:
Simon L. B. Nielsen 2010-11-14 09:33:47 +00:00
parent 943fa42c1e
commit 8dced518a6

View File

@ -1377,6 +1377,7 @@ int ssl3_get_key_exchange(SSL *s)
s->session->sess_cert->peer_ecdh_tmp=ecdh;
ecdh=NULL;
BN_CTX_free(bn_ctx);
bn_ctx = NULL;
EC_POINT_free(srvr_ecpoint);
srvr_ecpoint = NULL;
}