aboutsummaryrefslogtreecommitdiff
path: root/libxcb
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-30 10:03:09 +0000
committermarha <marha@users.sourceforge.net>2010-11-30 10:03:09 +0000
commit3e2f3f105cfe65384d2adeb2bd678850d9be47f9 (patch)
tree1c3e43a774683e6e47cbd2293679b7115fbaa3cb /libxcb
parentfed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7 (diff)
parent57818d0fe4f7cf94279909f03ec11b326b284f1e (diff)
downloadvcxsrv-3e2f3f105cfe65384d2adeb2bd678850d9be47f9.tar.gz
vcxsrv-3e2f3f105cfe65384d2adeb2bd678850d9be47f9.tar.bz2
vcxsrv-3e2f3f105cfe65384d2adeb2bd678850d9be47f9.zip
svn merge ^/branches/released .
Diffstat (limited to 'libxcb')
-rw-r--r--libxcb/src/xcb_auth.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libxcb/src/xcb_auth.c b/libxcb/src/xcb_auth.c
index 327e8acab..8a868a4a1 100644
--- a/libxcb/src/xcb_auth.c
+++ b/libxcb/src/xcb_auth.c
@@ -328,10 +328,15 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display)
if (!info->namelen)
goto no_auth; /* out of memory */
- if (!gotsockname && (sockname = get_peer_sock_name(getsockname, fd)) == NULL)
+ if (!gotsockname)
{
- free(info->name);
- goto no_auth; /* can only authenticate sockets */
+ free(sockname);
+
+ if ((sockname = get_peer_sock_name(getsockname, fd)) == NULL)
+ {
+ free(info->name);
+ goto no_auth; /* can only authenticate sockets */
+ }
}
ret = compute_auth(info, authptr, sockname);