]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix memory leak when freeing the DTLS record layer
authorMatt Caswell <matt@openssl.org>
Mon, 7 Nov 2022 15:13:35 +0000 (15:13 +0000)
committerHugo Landau <hlandau@openssl.org>
Mon, 14 Nov 2022 07:51:26 +0000 (07:51 +0000)
commit20c7febc860ae8e67f52912ee205d2e324e7beed
treee18a3949dc7b34432e754e1cf433bad575efb5d9
parent22094d11a780f7485f0929ccfac806e0d02f82a9
Fix memory leak when freeing the DTLS record layer

We need to check whether the sent_messages has actually buffered any
messages in it. If not we won't free the old record layer later when we
clear out the old buffered messages and a memory leak will result.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19586)
ssl/record/methods/dtls_meth.c
ssl/record/rec_layer_s3.c