From 9ff519542387d32ab1c3a8b1f45a375e1712a383 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 13 Sep 2022 18:01:18 +0100 Subject: Fix a record layer mem leak Make sure we free the record layer before we free the connection BIOs Reviewed-by: Hugo Landau Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/19198) --- ssl/ssl_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ssl/ssl_lib.c') diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 35758df33b..440d156975 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -1361,13 +1361,13 @@ void ossl_ssl_connection_free(SSL *ssl) /* Ignore return value */ ssl_free_wbio_buffer(s); + RECORD_LAYER_clear(&s->rlayer); + BIO_free_all(s->wbio); s->wbio = NULL; BIO_free_all(s->rbio); s->rbio = NULL; - RECORD_LAYER_clear(&s->rlayer); - BUF_MEM_free(s->init_buf); /* add extra stuff */ -- cgit v1.2.3 6fd2adec73'/> Contrib clone of linuxmatthias
summaryrefslogtreecommitdiffstats
blob: f7fc7eccccccde1c980be538be928d99db2c3b13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76