[X2Go-Commits] [nx-libs] 03/19: Loop.cpp: always close testSocketFD

git-admin at x2go.org git-admin at x2go.org
Sat Dec 30 03:35:15 CET 2017


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit b593edeb2b2d62434ca19418974227cc4ecaefa1
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed Dec 27 12:14:38 2017 +0100

    Loop.cpp: always close testSocketFD
    
    was missing in the non-abstract code path
    
    (partially) fixes ArcticaProject/nx-libs#612
---
 nxcomp/src/Loop.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index ce1f92a..cc0efa3 100644
--- a/nxcomp/src/Loop.cpp
+++ b/nxcomp/src/Loop.cpp
@@ -3944,12 +3944,13 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
     addr_length = len +3;
 
     int ret = connect(testSocketFD, (struct sockaddr *) xServerAddrABSTRACT, addr_length);
+    close(testSocketFD);
+
     if (ret == 0) {
 
         cerr << "Info" << ": Using abstract X11 socket in kernel namespace "
              << "for accessing DISPLAY=:" << xPort << ".\n";
 
-        close(testSocketFD);
         addr = (sockaddr *) xServerAddrABSTRACT;
         delete [] display;
         return;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list