channel: Fixed uninitialized use of session.

This commit is contained in:
Andreas Schneider
2011-02-19 10:24:57 +01:00
parent e7f7b4e499
commit 100e94c18e

View File

@@ -909,14 +909,14 @@ int ssh_channel_open_forward(ssh_channel channel, const char *remotehost,
ssh_string str = NULL;
int rc = SSH_ERROR;
enter_function();
if (channel == NULL) {
return rc;
}
session = channel->session;
enter_function();
if(remotehost == NULL || sourcehost == NULL) {
ssh_set_error_invalid(session, __FUNCTION__);
return rc;