From f1905c86470e5b76d72af12c9c77ecc719096b3f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 27 Dec 2017 12:15:47 +0100 Subject: Loop.cpp: delete structs when no longer required Fix another memleak (partially) fixes ArcticaProject/nx-libs#612 --- nxcomp/src/Loop.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nxcomp') diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index cc0efa361..5b6c2b4bc 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -3952,6 +3952,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr, << "for accessing DISPLAY=:" << xPort << ".\n"; addr = (sockaddr *) xServerAddrABSTRACT; + delete xServerAddrUNIX; delete [] display; return; @@ -3960,6 +3961,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr, cerr << "Info" << ": Falling back to file system X11 socket " << "for accessing DISPLAY=:" << xPort << ".\n"; + delete xServerAddrABSTRACT; #endif struct stat statInfo; -- cgit v1.2.3