summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2014-04-17 17:11:10 +0000
committerjsg <jsg@openbsd.org>2014-04-17 17:11:10 +0000
commit1755f63188d7448c97a63de5f89751bd9855e459 (patch)
tree23836e4531df35b6e3e6aeff8dad628553b0812c /lib/libssl/src
parentremove OPENSSL_realloc_clean usage here - replace with intrinsics to make (diff)
downloadwireguard-openbsd-1755f63188d7448c97a63de5f89751bd9855e459.tar.xz
wireguard-openbsd-1755f63188d7448c97a63de5f89751bd9855e459.zip
fix a potential double free
ok miod@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/ssl/d1_srvr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/ssl/d1_srvr.c b/lib/libssl/src/ssl/d1_srvr.c
index 9b87dcd0676..ce7b243c2db 100644
--- a/lib/libssl/src/ssl/d1_srvr.c
+++ b/lib/libssl/src/ssl/d1_srvr.c
@@ -1290,6 +1290,7 @@ dtls1_send_server_key_exchange(SSL *s)
(unsigned char *)encodedPoint,
encodedlen);
free(encodedPoint);
+ encodedPoint = NULL;
p += encodedlen;
}
#endif
@@ -1397,8 +1398,7 @@ f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
#ifndef OPENSSL_NO_ECDH
- if (encodedPoint != NULL)
- free(encodedPoint);
+ free(encodedPoint);
BN_CTX_free(bn_ctx);
#endif
EVP_MD_CTX_cleanup(&md_ctx);