From abe05fda8bdbfb35de7420cab31d5e459fabc874 Mon Sep 17 00:00:00 2001 From: Amir Mohammadi Date: Wed, 22 May 2024 19:48:51 +0330 Subject: Fix potential memory leak in test_bad_dtls Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/24464) --- test/bad_dtls_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c index 608377c..611bd4a 100644 --- a/test/bad_dtls_test.c +++ b/test/bad_dtls_test.c @@ -508,7 +508,6 @@ static int test_bad_dtls(void) if (!TEST_ptr(con) || !TEST_true(SSL_set_session(con, sess))) goto end; - SSL_SESSION_free(sess); rbio = BIO_new(BIO_s_mem()); wbio = BIO_new(BIO_s_mem()); @@ -596,6 +595,7 @@ static int test_bad_dtls(void) testresult = 1; end: + SSL_SESSION_free(sess); BIO_free(rbio); BIO_free(wbio); SSL_free(con); -- cgit v1.1