mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
bootchart: svg: fix checking of list end
If we have less samples than expected, systemd-bootchart will crash.
This commit is contained in:
parent
1d64e14c30
commit
c1682f17a0
@ -1167,7 +1167,7 @@ static void svg_ps_bars(void) {
|
||||
|
||||
ps->sample = ps->sample->next;
|
||||
sample_hz = ps->sample;
|
||||
for (ii=0;((ii<(int)arg_hz/2)&&(ps->sample->next));ii++)
|
||||
for (ii=0;((ii<(int)arg_hz/2)&&(sample_hz->next));ii++)
|
||||
sample_hz = sample_hz->next;
|
||||
|
||||
/* subtract bootchart cpu utilization from total */
|
||||
|
Loading…
Reference in New Issue
Block a user