From 5068512c1d5a02141d634c09f52dc97a6096a032 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 26 Sep 2020 14:43:17 +0000 Subject: 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@ --- src/lib/libssl/d1_both.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/libssl/d1_both.c') diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 6541a395a7..3d2516ce41 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/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) -- cgit v1.2.3-55-g6feb