aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-28 10:22:02 +0000
committermarha <marha@users.sourceforge.net>2011-03-28 10:22:02 +0000
commit0b9b391c5a7acb31e5d8061169649043a38d6d0e (patch)
tree5187c73f0b1abd3cb8fec9706a24251aacecdceb /xorg-server/os
parent272e57235cd60a2e65ac8258d96a02eb3939b687 (diff)
downloadvcxsrv-0b9b391c5a7acb31e5d8061169649043a38d6d0e.tar.gz
vcxsrv-0b9b391c5a7acb31e5d8061169649043a38d6d0e.tar.bz2
vcxsrv-0b9b391c5a7acb31e5d8061169649043a38d6d0e.zip
xserver xkeyboard-config mesa git update 28 Mar 2011
Diffstat (limited to 'xorg-server/os')
-rw-r--r--xorg-server/os/client.c3
1 files changed, 1 insertions, 2 deletions
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. */