killall: do not use alloca() in argument list

It is not allowed.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-06-26 19:52:00 -04:00
parent 7ac4fa7e92
commit 5841bd803f
+3 -2
View File
@@ -33,7 +33,7 @@
static bool ignore_proc(pid_t pid) {
_cleanup_fclose_ FILE *f = NULL;
char c;
char c, *p;
size_t count;
uid_t uid;
int r;
@@ -50,7 +50,8 @@ static bool ignore_proc(pid_t pid) {
if (uid != 0)
return false;
f = fopen(procfs_file_alloca(pid, "cmdline"), "re");
p = procfs_file_alloca(pid, "cmdline");
f = fopen(p, "re");
if (!f)
return true; /* not really, but has the desired effect */