Skip to content

Commit d6e1b04

Browse files
committed
Check correct pointer for null
After creating a new SSH context, the pointer returned wasn't checked; the pointer to the pointer was checked. Changed to the correct pointer. Affected function: SetupCTX.
1 parent 13ffca4 commit d6e1b04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/wolfsshd/wolfsshd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static int SetupCTX(WOLFSSHD_CONFIG* conf, WOLFSSH_CTX** ctx,
316316

317317
/* create a new WOLFSSH_CTX */
318318
*ctx = wolfSSH_CTX_new(WOLFSSH_ENDPOINT_SERVER, NULL);
319-
if (ctx == NULL) {
319+
if (*ctx == NULL) {
320320
wolfSSH_Log(WS_LOG_ERROR, "[SSHD] Couldn't allocate SSH CTX data.");
321321
ret = WS_MEMORY_E;
322322
}

0 commit comments

Comments
 (0)