fix memory leak
authorDr. Stephen Henson <steve@openssl.org>
Wed, 8 Jun 2011 15:56:20 +0000 (15:56 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 8 Jun 2011 15:56:20 +0000 (15:56 +0000)
ssl/s3_clnt.c

index c22837d05dc90fe3f15d66e7a128d581cfa46a3f..50bd415b568530f4bc95d9106b63c7fa9f53939b 100644 (file)
@@ -2243,6 +2243,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;
                                }
 
@@ -2254,6 +2255,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;
                                }