Merge pull request #297 from ejohnstown/agent-null

Null Agent
pull/301/head
JacobBarthelmeh 2020-10-29 11:42:22 +08:00 committed by GitHub
commit 86fdc40a58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -4623,7 +4623,10 @@ static int DoChannelOpen(WOLFSSH* ssh,
#ifdef WOLFSSH_AGENT
case ID_CHANTYPE_AUTH_AGENT:
WLOG(WS_LOG_INFO, "agent = %p", ssh->agent);
ssh->agent->channel = peerChannelId;
if (ssh->agent != NULL)
ssh->agent->channel = peerChannelId;
else
ret = WS_AGENT_NULL_E;
break;
#endif
default: