}
CloseHandle(callback->thread);
+ LeaveCriticalSection(&callback->lock);
DeleteCriticalSection(&callback->lock);
free(callback);
return CHANNEL_RC_OK;
if (callback->agent_fd == -1)
{
+ free(callback);
return CHANNEL_RC_INITIALIZATION_ERROR;
}
if (!callback->thread)
{
WLog_ERR(TAG, "CreateThread failed!");
+ DeleteCriticalSection(&callback->lock);
+ free(callback);
return CHANNEL_RC_INITIALIZATION_ERROR;
}
if (sshagent->listener_callback->agent_uds_path == NULL)
{
WLog_ERR(TAG, "Environment variable $SSH_AUTH_SOCK undefined!");
+ free(sshagent->listener_callback);
+ sshagent->listener_callback = NULL;
return CHANNEL_RC_INITIALIZATION_ERROR;
}