summaryrefslogtreecommitdiff
path: root/src/cgtop
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-04-27 14:28:35 +0200
committerLennart Poettering <lennart@poettering.net>2018-04-27 14:29:06 +0200
commitcf409d15fa78275e2606c4c53b550198ab5ef5c1 (patch)
tree7948a8f8e5395a71fce868370ab87434d41929ef /src/cgtop
parent1232c44718b04024d1cccecb5c0ae75c311eaea3 (diff)
downloadsystemd-cf409d15fa78275e2606c4c53b550198ab5ef5c1.tar.gz
tree-wide: use newa() rather than alloca() where we can
Diffstat (limited to 'src/cgtop')
-rw-r--r--src/cgtop/cgtop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index de5083bdde..de7ecf54cd 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -627,7 +627,7 @@ static void display(Hashmap *a) {
if (!terminal_is_dumb())
fputs(ANSI_HOME_CLEAR, stdout);
- array = alloca(sizeof(Group*) * hashmap_size(a));
+ array = newa(Group*, hashmap_size(a));
HASHMAP_FOREACH(g, a, i)
if (g->n_tasks_valid || g->cpu_valid || g->memory_valid || g->io_valid)