summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-26 19:48:32 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-26 19:52:00 -0400
commit5841bd803f1b651c0d70c6ae114630723a76d1da (patch)
tree0eac1e2690be22f6d48f036da2f9c254dadf97c2 /src/core
parent7ac4fa7e92c782f2978260023cff64aa683e6011 (diff)
killall: do not use alloca() in argument list
It is not allowed.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/killall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/killall.c b/src/core/killall.c
index a0f57455fb..e395050107 100644
--- a/src/core/killall.c
+++ b/src/core/killall.c
@@ -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 */