diff options
Diffstat (limited to 'src/channels.c')
-rw-r--r-- | src/channels.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c index e0f505c1..b136332f 100644 --- a/src/channels.c +++ b/src/channels.c @@ -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; |