Skip to content

Commit d34ee11

Browse files
committed
tests set null on EXPECT_SUCCESS
1 parent d00a137 commit d34ee11

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/api.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10621,7 +10621,8 @@ static int test_tls_ext_word16_overflow(void)
1062110621
ExpectIntEQ(TLSX_UseSessionTicket(&ssl->extensions, ticket, ssl->heap),
1062210622
WOLFSSL_SUCCESS);
1062310623
/* TLSX_UseSessionTicket takes ownership on success. */
10624-
ticket = NULL;
10624+
if (EXPECT_SUCCESS())
10625+
ticket = NULL;
1062510626
}
1062610627

1062710628
/* TLSX_GetRequestSize must refuse to encode: 4-byte ext header +
@@ -10697,7 +10698,8 @@ static int test_tls_ext_word16_overflow(void)
1069710698
if (EXPECT_SUCCESS() && ticket2 != NULL) {
1069810699
ExpectIntEQ(TLSX_UseSessionTicket(&ssl2->extensions, ticket2,
1069910700
ssl2->heap), WOLFSSL_SUCCESS);
10700-
ticket2 = NULL;
10701+
if (EXPECT_SUCCESS())
10702+
ticket2 = NULL;
1070110703
}
1070210704

1070310705
/* Exact boundary: internal sum == 0xFFFD must succeed, and the

0 commit comments

Comments
 (0)