Skip to content

Commit

Permalink
Fix potential memory leak in test_bad_dtls
Browse files Browse the repository at this point in the history
  • Loading branch information
amiremohamadi committed May 22, 2024
1 parent b9e084f commit ffdc223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/bad_dtls_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ffdc223

Please sign in to comment.