From: Dr. Stephen Henson Date: Wed, 8 Jun 2011 15:55:43 +0000 (+0000) Subject: fix memory leak X-Git-Tag: OpenSSL-fips-2_0-rc1~334 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca9335760ba0d21c2aaa428bebbf11bc2f96b9a4;p=openssl fix memory leak --- diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 9e52ed4f01..af8db00640 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -2408,6 +2408,7 @@ int ssl3_send_client_key_exchange(SSL *s) if (!DH_generate_key(dh_clnt)) { SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); + DH_free(dh_clnt); goto err; } @@ -2419,6 +2420,7 @@ int ssl3_send_client_key_exchange(SSL *s) if (n <= 0) { SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_DH_LIB); + DH_free(dh_clnt); goto err; }