summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_both.c
diff options
context:
space:
mode:
authorjsing <>2020-09-26 14:43:17 +0000
committerjsing <>2020-09-26 14:43:17 +0000
commit5068512c1d5a02141d634c09f52dc97a6096a032 (patch)
tree3ab9fb4ff9a8215ce9b9bc92be9d1a9d42999a94 /src/lib/libssl/d1_both.c
parent9b13245446b00e24d00467fda708aec05a3ac606 (diff)
downloadopenbsd-5068512c1d5a02141d634c09f52dc97a6096a032.tar.gz
openbsd-5068512c1d5a02141d634c09f52dc97a6096a032.tar.bz2
openbsd-5068512c1d5a02141d634c09f52dc97a6096a032.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 'src/lib/libssl/d1_both.c')
-rw-r--r--src/lib/libssl/d1_both.c6
1 files changed, 3 insertions, 3 deletions
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 @@
1/* $OpenBSD: d1_both.c,v 1.59 2020/09/26 08:58:00 jsing Exp $ */ 1/* $OpenBSD: d1_both.c,v 1.60 2020/09/26 14:43:17 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (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,
166static long dtls1_get_message_fragment(SSL *s, int st1, int stn, long max, 166static long dtls1_get_message_fragment(SSL *s, int st1, int stn, long max,
167 int *ok); 167 int *ok);
168 168
169static void dtls1_hm_fragment_free(hm_fragment *frag); 169void dtls1_hm_fragment_free(hm_fragment *frag);
170 170
171static hm_fragment * 171static hm_fragment *
172dtls1_hm_fragment_new(unsigned long frag_len, int reassembly) 172dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
@@ -195,7 +195,7 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
195 return NULL; 195 return NULL;
196} 196}
197 197
198static void 198void
199dtls1_hm_fragment_free(hm_fragment *frag) 199dtls1_hm_fragment_free(hm_fragment *frag)
200{ 200{
201 if (frag == NULL) 201 if (frag == NULL)