summaryrefslogtreecommitdiffstats
path: root/xrdpapi
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-23 19:07:38 -0700
committerLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-07-23 19:07:38 -0700
commitfde7be5151f7db096610cb59ca964e22e6af79fb (patch)
treef4bdecbe240522b0ea8ed81f74d6c3c75dc88b10 /xrdpapi
parent0c63a8feb3c52de98a5da51a0a0f743450c34645 (diff)
downloadxrdp-proprietary-fde7be5151f7db096610cb59ca964e22e6af79fb.tar.gz
xrdp-proprietary-fde7be5151f7db096610cb59ca964e22e6af79fb.zip
coverity: fixed issue argument cannot be negative
Diffstat (limited to 'xrdpapi')
-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);