aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-06-10 16:05:39 +0000
committerAndreas Schneider <mail@cynapses.org>2009-06-10 16:05:39 +0000
commit387348968842dce1fd5da139fc858866c10830e2 (patch)
treed24dd7aeef781ef3d593d4a69faa5e84dc02c9c5
parentd14a492019ac04d3afbb0fb519d16c331dc4e93b (diff)
downloadlibssh-387348968842dce1fd5da139fc858866c10830e2.tar.gz
libssh-387348968842dce1fd5da139fc858866c10830e2.tar.xz
libssh-387348968842dce1fd5da139fc858866c10830e2.zip
Simply leave the function, this should prevent a segfault.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@777 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r--libssh/channels.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index 23f4ceb5..6bf68446 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -905,7 +905,8 @@ int channel_write(CHANNEL *channel, const void *data, u32 len) {
while(channel->remote_window == 0) {
/* parse every incoming packet */
if (packet_wait(channel->session, 0, 0) == SSH_ERROR) {
- goto error;
+ leave_function();
+ return SSH_ERROR;
}
}
effectivelen = len > channel->remote_window ? channel->remote_window : len;