projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a413b5
)
core/transport: Fix leak found by covscan
author
Ondrej Holy
<oholy@redhat.com>
Mon, 20 Aug 2018 09:26:35 +0000
(11:26 +0200)
committer
Ondrej Holy
<oholy@redhat.com>
Wed, 22 Aug 2018 12:34:02 +0000
(14:34 +0200)
0 is valid return value from socket().
leaked_handle: Handle variable "sockfd" going out of scope leaks the handle.
libfreerdp/core/transport.c
patch
|
blob
|
history
diff --git
a/libfreerdp/core/transport.c
b/libfreerdp/core/transport.c
index
8c1ef1f
..
01e8682
100644
(file)
--- a/
libfreerdp/core/transport.c
+++ b/
libfreerdp/core/transport.c
@@
-419,7
+419,7
@@
BOOL transport_connect(rdpTransport* transport, const char* hostname,
else
sockfd = freerdp_tcp_connect(context, settings, hostname, port, timeout);
- if (sockfd <
1
)
+ if (sockfd <
0
)
return FALSE;
if (!transport_attach(transport, sockfd))