aboutsummaryrefslogtreecommitdiff
path: root/doc/forwarding.dox
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forwarding.dox')
-rw-r--r--doc/forwarding.dox4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/forwarding.dox b/doc/forwarding.dox
index ba33ae0a..96429174 100644
--- a/doc/forwarding.dox
+++ b/doc/forwarding.dox
@@ -106,7 +106,9 @@ int direct_forwarding(ssh_session session)
int nbytes, nwritten;
forwarding_channel = ssh_channel_new(session);
- if (rc != SSH_OK) return rc;
+ if (forwarding_channel == NULL) {
+ return rc;
+ }
rc = channel_open_forward(forwarding_channel,
"www.google.com", 80,