aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src/Loop.cpp
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-12-27 12:14:38 +0100
committerUlrich Sibiller <uli42@gmx.de>2017-12-29 02:31:26 +0100
commitb593edeb2b2d62434ca19418974227cc4ecaefa1 (patch)
tree1eac2852ea331e53fac620f5c652a110b4f3b910 /nxcomp/src/Loop.cpp
parent4107159e218c5d641306acf34abcb7596f63f7a5 (diff)
downloadnx-libs-b593edeb2b2d62434ca19418974227cc4ecaefa1.tar.gz
nx-libs-b593edeb2b2d62434ca19418974227cc4ecaefa1.tar.bz2
nx-libs-b593edeb2b2d62434ca19418974227cc4ecaefa1.zip
Loop.cpp: always close testSocketFD
was missing in the non-abstract code path (partially) fixes ArcticaProject/nx-libs#612
Diffstat (limited to 'nxcomp/src/Loop.cpp')
-rw-r--r--nxcomp/src/Loop.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index ce1f92a68..cc0efa361 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;