Skip to content

Commit de59e9d

Browse files
committed
change to BIO_free_all() on EXPECT_FAIL()
1 parent 61e4142 commit de59e9d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/api.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38173,7 +38173,8 @@ static int test_wolfSSL_BIO_write(void)
3817338173
ExpectNotNull(bio64 = BIO_new(BIO_f_base64()));
3817438174
ExpectNotNull(bio = BIO_push(BIO_new(BIO_f_base64()), bio64));
3817538175
if (EXPECT_FAIL()) {
38176-
BIO_free(bio64);
38176+
BIO_free_all(bio);
38177+
bio = NULL;
3817738178
bio64 = NULL;
3817838179
}
3817938180
ExpectNotNull(bio_mem = BIO_new(BIO_s_mem()));
@@ -38183,6 +38184,9 @@ static int test_wolfSSL_BIO_write(void)
3818338184
}
3818438185

3818538186
/* now should convert to base64 when stored and then decode with read */
38187+
if (bio == NULL) {
38188+
ExpectNotNull(bio = BIO_new(BIO_f_base64()));
38189+
}
3818638190
ExpectIntEQ(BIO_write(bio, msg, sizeof(msg)), 25);
3818738191
BIO_flush(bio);
3818838192
sz = sizeof(out);

0 commit comments

Comments
 (0)