Skip to content

Commit 7977a60

Browse files
committed
src/internal.c: in FreeSskeArgs(), move nullness check on args to the start, and make it unconditional, to resolve nullPointerRedundantChecks.
1 parent e1fe186 commit 7977a60

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/internal.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35719,6 +35719,9 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
3571935719

3572035720
(void)ssl;
3572135721

35722+
if (args == NULL)
35723+
return;
35724+
3572235725
#if defined(HAVE_ECC) || defined(HAVE_CURVE25519) || defined(HAVE_CURVE448)
3572335726
XFREE(args->exportBuf, ssl->heap, DYNAMIC_TYPE_DER);
3572435727
args->exportBuf = NULL;
@@ -35728,16 +35731,10 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
3572835731
args->verifySig = NULL;
3572935732
#endif
3573035733

35731-
if (
35732-
#ifdef WOLFSSL_ASYNC_IO
35733-
args != NULL &&
35734-
#endif
35735-
args->input != NULL) {
35734+
if (args->input != NULL) {
3573635735
XFREE(args->input, ssl->heap, DYNAMIC_TYPE_IN_BUFFER);
3573735736
args->input = NULL;
3573835737
}
35739-
35740-
(void)args;
3574135738
}
3574235739

3574335740
/* handle generation of server_key_exchange (12) */

0 commit comments

Comments
 (0)