diff options
author | Amir Mohammadi <amiremohamadi@yahoo.com> | 2024-05-22 19:48:51 +0330 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2024-05-29 13:43:22 +0100 |
commit | 7b50a23f8be965236aaa68483f7502b85ec1e340 (patch) | |
tree | 3462d7e1d87a082c2e7fa915371c9434b3d941a2 | |
parent | e4290403a85c1e5f691f50c0eff0417138ef4965 (diff) |
Fix potential memory leak in test_bad_dtls
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24464)
(cherry picked from commit abe05fda8bdbfb35de7420cab31d5e459fabc874)
-rw-r--r-- | test/bad_dtls_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/bad_dtls_test.c b/test/bad_dtls_test.c index 7b50ee0545..06dc480b79 100644 --- a/test/bad_dtls_test.c +++ b/test/bad_dtls_test.c @@ -504,7 +504,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()); @@ -592,6 +591,7 @@ static int test_bad_dtls(void) testresult = 1; end: + SSL_SESSION_free(sess); BIO_free(rbio); BIO_free(wbio); SSL_free(con); |