Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
4107159e
Commit
4107159e
authored
Dec 27, 2017
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loop.cpp: free display before leaving SetupDisplaySocket()
fixes a memory leak
parent
604e0968
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Loop.cpp
nxcomp/src/Loop.cpp
+5
-0
No files found.
nxcomp/src/Loop.cpp
View file @
4107159e
...
@@ -3877,6 +3877,8 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
...
@@ -3877,6 +3877,8 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
cerr
<<
"Error"
<<
": Invalid display '"
<<
display
<<
"'.
\n
"
;
cerr
<<
"Error"
<<
": Invalid display '"
<<
display
<<
"'.
\n
"
;
delete
[]
display
;
HandleCleanup
();
HandleCleanup
();
}
}
...
@@ -3949,6 +3951,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
...
@@ -3949,6 +3951,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
close
(
testSocketFD
);
close
(
testSocketFD
);
addr
=
(
sockaddr
*
)
xServerAddrABSTRACT
;
addr
=
(
sockaddr
*
)
xServerAddrABSTRACT
;
delete
[]
display
;
return
;
return
;
}
else
{
}
else
{
...
@@ -4000,6 +4003,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
...
@@ -4000,6 +4003,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
cerr
<<
"Error"
<<
": Error "
<<
EGET
()
<<
" '"
<<
ESTR
()
cerr
<<
"Error"
<<
": Error "
<<
EGET
()
<<
" '"
<<
ESTR
()
<<
"' checking '"
<<
unixSocketDir
<<
"'.
\n
"
;
<<
"' checking '"
<<
unixSocketDir
<<
"'.
\n
"
;
delete
[]
display
;
HandleCleanup
();
HandleCleanup
();
}
}
...
@@ -4048,6 +4052,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
...
@@ -4048,6 +4052,7 @@ void SetupDisplaySocket(int &addr_family, sockaddr *&addr,
cerr
<<
"Error"
<<
": Unknown display host '"
<<
display
cerr
<<
"Error"
<<
": Unknown display host '"
<<
display
<<
"'.
\n
"
;
<<
"'.
\n
"
;
delete
[]
display
;
HandleCleanup
();
HandleCleanup
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment