From 57818d0fe4f7cf94279909f03ec11b326b284f1e Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 26 Nov 2010 15:22:07 +0000 Subject: libXext xserver libfontenc libX11 libxcb pixman git update 26 11 2010 --- libxcb/src/xcb_auth.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libxcb/src') 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); -- cgit v1.2.3