aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_auth.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-26 15:22:07 +0000
committermarha <marha@users.sourceforge.net>2010-11-26 15:22:07 +0000
commit57818d0fe4f7cf94279909f03ec11b326b284f1e (patch)
tree88487618bf9c63429ea49574b110854ff8ca28b9 /libxcb/src/xcb_auth.c
parent6fda93be42ace9eeab0e82ceebb6798961c9105c (diff)
downloadvcxsrv-57818d0fe4f7cf94279909f03ec11b326b284f1e.tar.gz
vcxsrv-57818d0fe4f7cf94279909f03ec11b326b284f1e.tar.bz2
vcxsrv-57818d0fe4f7cf94279909f03ec11b326b284f1e.zip
libXext xserver libfontenc libX11 libxcb pixman git update 26 11 2010
Diffstat (limited to 'libxcb/src/xcb_auth.c')
-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 e60cb5f98..967ba283a 100644
--- a/libxcb/src/xcb_auth.c
+++ b/libxcb/src/xcb_auth.c
@@ -327,10 +327,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);