Merge pull request #92 from ejohnstown/release-fixes

Scan Build Fixes
pull/93/head v1.3.0-stable
JacobBarthelmeh 2018-08-15 13:53:41 -06:00 committed by GitHub
commit 20dcc22c01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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);
}

View File

@ -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 */
@ -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;
}