chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ac4fa7
)
killall: do not use alloca() in argument list
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 26 Jun 2013 23:48:32 +0000
(19:48 -0400)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 26 Jun 2013 23:52:00 +0000
(19:52 -0400)
It is not allowed.
src/core/killall.c
patch
|
blob
|
history
diff --git
a/src/core/killall.c
b/src/core/killall.c
index a0f57455fb41ffb25062f1d8b33e533f3974215f..e3950501075e736230eb3fd970faff65f17b9283 100644
(file)
--- 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 */