summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2020-09-26 14:43:17 +0000
committerjsing <jsing@openbsd.org>2020-09-26 14:43:17 +0000
commit55a1a82c49eebcb2f051beeade1a52536be709cc (patch)
treeacf6a2fd3f1dce692945f1205e19964c594fca76 /lib/libssl/d1_both.c
parentAdd support for POWER9P "Axone" CPUs. (diff)
downloadwireguard-openbsd-55a1a82c49eebcb2f051beeade1a52536be709cc.tar.xz
wireguard-openbsd-55a1a82c49eebcb2f051beeade1a52536be709cc.zip
Call dtls1_hm_fragment_free() from dtls1_drain_fragments()
Currently dtls1_drain_fragments() has a incomplete handrolled version of dtls1_hm_fragment_free(), which has the potential to leak memory. Replace the handrolled free with a call to dtls1_hm_fragment_free(). ok inoguchi@ tb@
Diffstat (limited to 'lib/libssl/d1_both.c')
-rw-r--r--lib/libssl/d1_both.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libssl/d1_both.c b/lib/libssl/d1_both.c
index 6541a395a7b..3d2516ce412 100644
--- a/lib/libssl/d1_both.c
+++ b/lib/libssl/d1_both.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_both.c,v 1.59 2020/09/26 08:58:00 jsing Exp $ */
+/* $OpenBSD: d1_both.c,v 1.60 2020/09/26 14:43:17 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -166,7 +166,7 @@ static int dtls1_write_message_header(const struct hm_header_st *msg_hdr,
static long dtls1_get_message_fragment(SSL *s, int st1, int stn, long max,
int *ok);
-static void dtls1_hm_fragment_free(hm_fragment *frag);
+void dtls1_hm_fragment_free(hm_fragment *frag);
static hm_fragment *
dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
@@ -195,7 +195,7 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
return NULL;
}
-static void
+void
dtls1_hm_fragment_free(hm_fragment *frag)
{
if (frag == NULL)