mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Fix potential double free in sslapitest.c
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14758)
This commit is contained in:
parent
0cfbc828e0
commit
493e78986f
@ -2743,8 +2743,10 @@ static int execute_test_ssl_bio(int pop_ssl, bio_change_t change_bio)
|
||||
|
||||
/* Verify changing the rbio/wbio directly does not cause leaks */
|
||||
if (change_bio != NO_BIO_CHANGE) {
|
||||
if (!TEST_ptr(membio2 = BIO_new(BIO_s_mem())))
|
||||
if (!TEST_ptr(membio2 = BIO_new(BIO_s_mem()))) {
|
||||
ssl = NULL;
|
||||
goto end;
|
||||
}
|
||||
if (change_bio == CHANGE_RBIO)
|
||||
SSL_set0_rbio(ssl, membio2);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user