Skip to content

Commit

Permalink
Merge pull request #92 from ejohnstown/release-fixes
Browse files Browse the repository at this point in the history
Scan Build Fixes
  • Loading branch information
JacobBarthelmeh authored Aug 15, 2018
2 parents ae75319 + f08628a commit 20dcc22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/echoserver/echoserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ THREAD_RETURN WOLFSSH_THREAD echoserver_test(void* args)

ssh = wolfSSH_new(ctx);
if (ssh == NULL) {
free(threadCtx);
fprintf(stderr, "Couldn't allocate SSH data.\n");
exit(EXIT_FAILURE);
}
Expand Down
6 changes: 5 additions & 1 deletion tests/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static int test_KDF(void)
byte* h = NULL;
byte* sId = NULL;
byte* eKey = NULL;
word32 kSz, hSz, sIdSz, eKeySz;
word32 kSz = 0, hSz = 0, sIdSz = 0, eKeySz = 0;
byte cKey[32]; /* Greater of SHA256_DIGEST_SIZE and AES_BLOCK_SIZE */
/* sId - Session ID, eKey - Expected Key, cKey - Calculated Key */

Expand Down Expand Up @@ -347,6 +347,10 @@ static int test_KDF(void)
}

FreeBins(k, h, sId, eKey);
k = NULL;
h = NULL;
sId = NULL;
eKey = NULL;

if (result != 0) break;
}
Expand Down

0 comments on commit 20dcc22

Please sign in to comment.