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
1c09eab7
Commit
1c09eab7
authored
Nov 28, 2017
by
Ulrich Sibiller
Committed by
Mihai Moldovan
Dec 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Loop.cpp: fix two memleaks
parent
c4660e10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
Loop.cpp
nxcomp/src/Loop.cpp
+19
-4
No files found.
nxcomp/src/Loop.cpp
View file @
1c09eab7
...
...
@@ -4278,15 +4278,20 @@ int ListenConnectionTCP(const char *host, long port, const char *label)
int
ListenConnection
(
ChannelEndPoint
&
endpoint
,
const
char
*
label
)
{
char
*
unixPath
,
*
host
;
char
*
unixPath
=
NULL
,
*
host
=
NULL
;
long
port
;
int
result
=
-
1
;
if
(
endpoint
.
getUnixPath
(
&
unixPath
))
{
re
turn
ListenConnectionUnix
(
unixPath
,
label
);
re
sult
=
ListenConnectionUnix
(
unixPath
,
label
);
}
else
if
(
endpoint
.
getTCPHostAndPort
(
&
host
,
&
port
))
{
re
turn
ListenConnectionTCP
(
host
,
port
,
label
);
re
sult
=
ListenConnectionTCP
(
host
,
port
,
label
);
}
return
-
1
;
free
(
unixPath
);
unixPath
=
NULL
;
free
(
host
);
host
=
NULL
;
return
result
;
}
static
int
AcceptConnection
(
int
fd
,
int
domain
,
const
char
*
label
)
...
...
@@ -6739,10 +6744,20 @@ int ConnectToRemote(ChannelEndPoint &socketAddress)
}
}
free
(
unixPath
);
unixPath
=
NULL
;
free
(
hostName
);
hostName
=
NULL
;
return
pFD
;
ConnectToRemoteError:
free
(
unixPath
);
unixPath
=
NULL
;
free
(
hostName
);
hostName
=
NULL
;
if
(
pFD
!=
-
1
)
{
close
(
pFD
);
...
...
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