diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/s3_clnt.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index d1455cffc1..f2c7dd2442 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
| @@ -1674,14 +1674,11 @@ f_err: | |||
| 1674 | ssl3_send_alert(s, SSL3_AL_FATAL, al); | 1674 | ssl3_send_alert(s, SSL3_AL_FATAL, al); |
| 1675 | err: | 1675 | err: |
| 1676 | EVP_PKEY_free(pkey); | 1676 | EVP_PKEY_free(pkey); |
| 1677 | if (rsa != NULL) | 1677 | RSA_free(rsa); |
| 1678 | RSA_free(rsa); | 1678 | DH_free(dh); |
| 1679 | if (dh != NULL) | ||
| 1680 | DH_free(dh); | ||
| 1681 | BN_CTX_free(bn_ctx); | 1679 | BN_CTX_free(bn_ctx); |
| 1682 | EC_POINT_free(srvr_ecpoint); | 1680 | EC_POINT_free(srvr_ecpoint); |
| 1683 | if (ecdh != NULL) | 1681 | EC_KEY_free(ecdh); |
| 1684 | EC_KEY_free(ecdh); | ||
| 1685 | EVP_MD_CTX_cleanup(&md_ctx); | 1682 | EVP_MD_CTX_cleanup(&md_ctx); |
| 1686 | return (-1); | 1683 | return (-1); |
| 1687 | } | 1684 | } |
| @@ -2333,8 +2330,7 @@ ssl3_send_client_key_exchange(SSL *s) | |||
| 2333 | /* Free allocated memory */ | 2330 | /* Free allocated memory */ |
| 2334 | BN_CTX_free(bn_ctx); | 2331 | BN_CTX_free(bn_ctx); |
| 2335 | free(encodedPoint); | 2332 | free(encodedPoint); |
| 2336 | if (clnt_ecdh != NULL) | 2333 | EC_KEY_free(clnt_ecdh); |
| 2337 | EC_KEY_free(clnt_ecdh); | ||
| 2338 | EVP_PKEY_free(srvr_pub_pkey); | 2334 | EVP_PKEY_free(srvr_pub_pkey); |
| 2339 | } else if (alg_k & SSL_kGOST) { | 2335 | } else if (alg_k & SSL_kGOST) { |
| 2340 | /* GOST key exchange message creation */ | 2336 | /* GOST key exchange message creation */ |
| @@ -2444,7 +2440,7 @@ ssl3_send_client_key_exchange(SSL *s) | |||
| 2444 | s->session->master_key_length = | 2440 | s->session->master_key_length = |
| 2445 | s->method->ssl3_enc->generate_master_secret(s, | 2441 | s->method->ssl3_enc->generate_master_secret(s, |
| 2446 | s->session->master_key, premaster_secret, 32); | 2442 | s->session->master_key, premaster_secret, 32); |
| 2447 | EVP_PKEY_free(pub_key); | 2443 | EVP_PKEY_free(pub_key); |
| 2448 | 2444 | ||
| 2449 | } | 2445 | } |
| 2450 | #ifndef OPENSSL_NO_PSK | 2446 | #ifndef OPENSSL_NO_PSK |
| @@ -2543,11 +2539,11 @@ psk_err: | |||
| 2543 | 2539 | ||
| 2544 | /* SSL3_ST_CW_KEY_EXCH_B */ | 2540 | /* SSL3_ST_CW_KEY_EXCH_B */ |
| 2545 | return (ssl3_do_write(s, SSL3_RT_HANDSHAKE)); | 2541 | return (ssl3_do_write(s, SSL3_RT_HANDSHAKE)); |
| 2542 | |||
| 2546 | err: | 2543 | err: |
| 2547 | BN_CTX_free(bn_ctx); | 2544 | BN_CTX_free(bn_ctx); |
| 2548 | free(encodedPoint); | 2545 | free(encodedPoint); |
| 2549 | if (clnt_ecdh != NULL) | 2546 | EC_KEY_free(clnt_ecdh); |
| 2550 | EC_KEY_free(clnt_ecdh); | ||
| 2551 | EVP_PKEY_free(srvr_pub_pkey); | 2547 | EVP_PKEY_free(srvr_pub_pkey); |
| 2552 | return (-1); | 2548 | return (-1); |
| 2553 | } | 2549 | } |
| @@ -2726,8 +2722,7 @@ ssl3_send_client_certificate(SSL *s) | |||
| 2726 | 2722 | ||
| 2727 | if (x509 != NULL) | 2723 | if (x509 != NULL) |
| 2728 | X509_free(x509); | 2724 | X509_free(x509); |
| 2729 | if (pkey != NULL) | 2725 | EVP_PKEY_free(pkey); |
| 2730 | EVP_PKEY_free(pkey); | ||
| 2731 | if (i == 0) { | 2726 | if (i == 0) { |
| 2732 | if (s->version == SSL3_VERSION) { | 2727 | if (s->version == SSL3_VERSION) { |
| 2733 | s->s3->tmp.cert_req = 0; | 2728 | s->s3->tmp.cert_req = 0; |
