summaryrefslogtreecommitdiffstats
path: root/xrdpapi/xrdpapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'xrdpapi/xrdpapi.c')
-rw-r--r--xrdpapi/xrdpapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xrdpapi/xrdpapi.c b/xrdpapi/xrdpapi.c
index 23630804..9310f6f8 100644
--- a/xrdpapi/xrdpapi.c
+++ b/xrdpapi/xrdpapi.c
@@ -124,7 +124,11 @@ WTSVirtualChannelOpenEx(unsigned int SessionId, const char *pVirtualName,
}
/* we use unix domain socket to communicate with chansrv */
- wts->fd = socket(AF_UNIX, SOCK_STREAM, 0);
+ if ((wts->fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+ {
+ g_free(wts);
+ return NULL;
+ }
/* set non blocking */
llong = fcntl(wts->fd, F_GETFL);