diff options
Diffstat (limited to 'xorg-server/os/client.c')
-rw-r--r-- | xorg-server/os/client.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/xorg-server/os/client.c b/xorg-server/os/client.c index b5349778b..4aec097e1 100644 --- a/xorg-server/os/client.c +++ b/xorg-server/os/client.c @@ -149,13 +149,7 @@ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) cmdsize = strlen(path) + 1; if (cmdname) { - char *name = malloc(cmdsize); - if (name) - { - strncpy(name, path, cmdsize); - name[cmdsize - 1] = '\0'; - *cmdname = name; - } + *cmdname = strdup(path); } /* Construct the arguments for client process. */ |