summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/d1_clnt.c')
-rw-r--r--src/lib/libssl/d1_clnt.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c
index 8f304a75ff..d82b099e08 100644
--- a/src/lib/libssl/d1_clnt.c
+++ b/src/lib/libssl/d1_clnt.c
@@ -1231,8 +1231,7 @@ dtls1_send_client_key_exchange(SSL *s)
1231 1231
1232 /* Free allocated memory */ 1232 /* Free allocated memory */
1233 BN_CTX_free(bn_ctx); 1233 BN_CTX_free(bn_ctx);
1234 if (encodedPoint != NULL) 1234 free(encodedPoint);
1235 free(encodedPoint);
1236 if (clnt_ecdh != NULL) 1235 if (clnt_ecdh != NULL)
1237 EC_KEY_free(clnt_ecdh); 1236 EC_KEY_free(clnt_ecdh);
1238 EVP_PKEY_free(srvr_pub_pkey); 1237 EVP_PKEY_free(srvr_pub_pkey);
@@ -1277,9 +1276,9 @@ dtls1_send_client_key_exchange(SSL *s)
1277 t += psk_len; 1276 t += psk_len;
1278 s2n(psk_len, t); 1277 s2n(psk_len, t);
1279 1278
1280 if (s->session->psk_identity_hint != NULL) 1279 free(s->session->psk_identity_hint);
1281 free(s->session->psk_identity_hint); 1280 s->session->psk_identity_hint =
1282 s->session->psk_identity_hint = BUF_strdup(s->ctx->psk_identity_hint); 1281 BUF_strdup(s->ctx->psk_identity_hint);
1283 if (s->ctx->psk_identity_hint != NULL && 1282 if (s->ctx->psk_identity_hint != NULL &&
1284 s->session->psk_identity_hint == NULL) { 1283 s->session->psk_identity_hint == NULL) {
1285 SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE, 1284 SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,
@@ -1287,8 +1286,7 @@ dtls1_send_client_key_exchange(SSL *s)
1287 goto psk_err; 1286 goto psk_err;
1288 } 1287 }
1289 1288
1290 if (s->session->psk_identity != NULL) 1289 free(s->session->psk_identity);
1291 free(s->session->psk_identity);
1292 s->session->psk_identity = BUF_strdup(identity); 1290 s->session->psk_identity = BUF_strdup(identity);
1293 if (s->session->psk_identity == NULL) { 1291 if (s->session->psk_identity == NULL) {
1294 SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE, 1292 SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE,
@@ -1344,8 +1342,7 @@ psk_err:
1344err: 1342err:
1345#ifndef OPENSSL_NO_ECDH 1343#ifndef OPENSSL_NO_ECDH
1346 BN_CTX_free(bn_ctx); 1344 BN_CTX_free(bn_ctx);
1347 if (encodedPoint != NULL) 1345 free(encodedPoint);
1348 free(encodedPoint);
1349 if (clnt_ecdh != NULL) 1346 if (clnt_ecdh != NULL)
1350 EC_KEY_free(clnt_ecdh); 1347 EC_KEY_free(clnt_ecdh);
1351 EVP_PKEY_free(srvr_pub_pkey); 1348 EVP_PKEY_free(srvr_pub_pkey);