summaryrefslogtreecommitdiffstats
path: root/xrdp
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-02-17 01:38:32 +0000
committerjsorg71 <jsorg71>2005-02-17 01:38:32 +0000
commit97b2519fd4b2445f0108f6458154d736a0a1191a (patch)
treead8acbfcc90d26f67377aa7857d2246eda0305f9 /xrdp
parentaafcaa6a561d15eea6b6d323366919fc71c7218a (diff)
downloadxrdp-proprietary-97b2519fd4b2445f0108f6458154d736a0a1191a.tar.gz
xrdp-proprietary-97b2519fd4b2445f0108f6458154d736a0a1191a.zip
fix thread leak, gota detach
Diffstat (limited to 'xrdp')
-rw-r--r--xrdp/xrdp_listen.c5
-rw-r--r--xrdp/xrdp_orders.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c
index 92de0b99..6b965ecd 100644
--- a/xrdp/xrdp_listen.c
+++ b/xrdp/xrdp_listen.c
@@ -139,7 +139,8 @@ int xrdp_listen_main_loop(struct xrdp_listen* self)
self->status = 1;
self->sck = g_tcp_socket();
g_tcp_set_non_blocking(self->sck);
- if (g_tcp_bind(self->sck, "3389") != 0)
+ error = g_tcp_bind(self->sck, "3389");
+ if (error != 0)
{
g_printf("bind error in xrdp_listen_main_loop\n\r");
g_tcp_close(self->sck);
@@ -178,7 +179,7 @@ int xrdp_listen_main_loop(struct xrdp_listen* self)
}
else
{
- DEBUG(("error, listener done\n\r"));
+ DEBUG(("listen error in xrdp_listen_main_loop\n\r"));
}
xrdp_listen_term_processes(self);
g_tcp_close(self->sck);
diff --git a/xrdp/xrdp_orders.c b/xrdp/xrdp_orders.c
index 688c211f..7b5e1273 100644
--- a/xrdp/xrdp_orders.c
+++ b/xrdp/xrdp_orders.c
@@ -39,6 +39,10 @@ struct xrdp_orders* xrdp_orders_create(struct xrdp_process* owner,
/*****************************************************************************/
void xrdp_orders_delete(struct xrdp_orders* self)
{
+ if (self == 0)
+ {
+ return;
+ }
free_stream(self->out_s);
g_free(self);
}