[X2Go-Commits] [x2goclient] 02/03: src/sshmasterconnection.cpp: close channel on failure in checkLogin ().
git-admin at x2go.org
git-admin at x2go.org
Sun Jun 16 18:28:58 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 52299f25ca1dcbe646585760443139ad1c9b989b
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Sun Jun 16 18:27:07 2019 +0200
src/sshmasterconnection.cpp: close channel on failure in checkLogin ().
---
debian/changelog | 4 ++++
src/sshmasterconnection.cpp | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index ac4db93..f926b20 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -130,6 +130,10 @@ x2goclient (4.1.2.2-0x2go1) UNRELEASED; urgency=medium
- Add new translation: Czech.
- Second update round of Czech translation + enable it in x2goclient.pro.
+ [ Ulrich Sibiller ]
+ * New upstream release (4.1.2.2):
+ - src/sshmasterconnection.cpp: close channel on failure in checkLogin ().
+
-- X2Go Release Manager <git-admin at x2go.org> Tue, 26 Jun 2018 00:39:28 +0200
x2goclient (4.1.2.1-0x2go1) unstable; urgency=medium
diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index eb163f0..e9cb6d9 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1645,6 +1645,7 @@ bool SshMasterConnection::checkLogin()
QString err=ssh_get_error ( my_ssh_session );
QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_open_session");
x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+ ssh_channel_free(channel);
return false;
}
if (ssh_channel_request_pty(channel)!=SSH_OK)
@@ -1652,6 +1653,7 @@ bool SshMasterConnection::checkLogin()
QString err=ssh_get_error ( my_ssh_session );
QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_pty");
x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+ ssh_channel_free(channel);
return false;
}
if(ssh_channel_change_pty_size(channel, 80, 24)!=SSH_OK)
@@ -1659,6 +1661,7 @@ bool SshMasterConnection::checkLogin()
QString err=ssh_get_error ( my_ssh_session );
QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_change_pty_size");
x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+ ssh_channel_free(channel);
return false;
}
if ( ssh_channel_request_exec ( channel, "echo \"LOGIN OK\"" ) != SSH_OK )
@@ -1666,6 +1669,7 @@ bool SshMasterConnection::checkLogin()
QString err=ssh_get_error ( my_ssh_session );
QString errorMsg=tr ( "%1 failed." ).arg ("ssh_channel_request_exec");
x2goDebug<<errorMsg.left (errorMsg.size () - 1)<<": "<<err<<endl;
+ ssh_channel_free(channel);
}
else
{
@@ -1678,7 +1682,10 @@ bool SshMasterConnection::checkLogin()
{
int nbytes = ssh_channel_read_nonblocking(channel, buffer, sizeof(buffer), 0);
if (nbytes < 0)
+ {
+ ssh_channel_free(channel);
return false;
+ }
if (nbytes > 0)
{
QString inf=QByteArray ( buffer,nbytes );
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list