From 0b9b391c5a7acb31e5d8061169649043a38d6d0e Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 28 Mar 2011 10:22:02 +0000 Subject: xserver xkeyboard-config mesa git update 28 Mar 2011 --- xorg-server/os/client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xorg-server/os/client.c') diff --git a/xorg-server/os/client.c b/xorg-server/os/client.c index 1311855d5..b5349778b 100644 --- a/xorg-server/os/client.c +++ b/xorg-server/os/client.c @@ -140,10 +140,9 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) /* Read the contents of /proc/pid/cmdline. It should contain the * process name and arguments. */ totsize = read(fd, path, sizeof(path)); + close(fd); if (totsize <= 0) return; - if (close(fd) < 0) - return; path[totsize - 1] = '\0'; /* Contruct the process name without arguments. */ -- cgit v1.2.3