From 292ed71f0950847e5ec5325f2c6faee5a1901f4d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 28 Aug 2011 20:02:27 +0200 Subject: [PATCH] doc: Fix a check in the doc code. --- doc/forwarding.dox | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,