summaryrefslogtreecommitdiff
path: root/Xtranssock.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xtranssock.c')
-rw-r--r--Xtranssock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Xtranssock.c b/Xtranssock.c
index eacd807..82d8255 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -2228,7 +2228,6 @@ TRANS(SocketUNIXClose) (XtransConnInfo ciptr)
*/
struct sockaddr_un *sockname = (struct sockaddr_un *) ciptr->addr;
- char path[200]; /* > sizeof sun_path +1 */
int ret;
PRMSG (2,"SocketUNIXClose(%p,%d)\n", ciptr, ciptr->fd, 0);
@@ -2240,10 +2239,8 @@ TRANS(SocketUNIXClose) (XtransConnInfo ciptr)
&& sockname->sun_family == AF_UNIX
&& sockname->sun_path[0])
{
- strncpy (path, sockname->sun_path,
- ciptr->addrlen - sizeof (sockname->sun_family));
if (!(ciptr->flags & TRANS_NOUNLINK))
- unlink (path);
+ unlink (sockname->sun_path);
}
return ret;