summaryrefslogtreecommitdiffstats
path: root/src/bootchart
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2015-02-24 17:32:31 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-02-25 05:51:55 +0100
commitc1682f17a0c966988e865c649e565dae41abf32d (patch)
tree030ba5ac166d10a8f710c34ed526b269f605481c /src/bootchart
parentbuild-sys: fail if gnuefi files are not found (diff)
downloadsystemd-c1682f17a0c966988e865c649e565dae41abf32d.tar.xz
systemd-c1682f17a0c966988e865c649e565dae41abf32d.zip
bootchart: svg: fix checking of list end
If we have less samples than expected, systemd-bootchart will crash.
Diffstat (limited to 'src/bootchart')
-rw-r--r--src/bootchart/svg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index 93b4764ee7..e1fc531ba9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -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 */