summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_listen.c
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-19 11:56:00 -0700
committerLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-19 11:56:00 -0700
commit3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3 (patch)
tree8888abf5bfb3b666027746c78a7466e09fa3a557 /xrdp/xrdp_listen.c
parentc64b1544752547cede30647bb03ab1bbbc06d079 (diff)
downloadxrdp-proprietary-3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3.tar.gz
xrdp-proprietary-3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3.zip
coverity: fixed resolution leak issues
Diffstat (limited to 'xrdp/xrdp_listen.c')
-rw-r--r--xrdp/xrdp_listen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c
index 2a706b91..7f6ab281 100644
--- a/xrdp/xrdp_listen.c
+++ b/xrdp/xrdp_listen.c
@@ -169,7 +169,7 @@ xrdp_listen_get_port_address(char *port, int port_bytes,
*tcp_nodelay = 0 ;
*tcp_keepalive = 0 ;
- if (fd > 0)
+ if (fd != -1)
{
names = list_create();
names->auto_free = 1;
@@ -242,9 +242,10 @@ xrdp_listen_get_port_address(char *port, int port_bytes,
list_delete(names);
list_delete(values);
- g_file_close(fd);
}
+ g_file_close(fd);
+
/* startup_param overrides */
if (startup_param->port[0] != 0)
{