]> granicus.if.org Git - sysstat/commitdiff
iostat: Make sure pointer on linked list has been initialized
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 4 Apr 2020 07:17:48 +0000 (09:17 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 4 Apr 2020 07:17:48 +0000 (09:17 +0200)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
iostat.c

index 07c4dd7444df94bfa3977b29cf8148f296afc90b..86eb8d79cebef8f3f5950b66d0d520f17b1f1363 100644 (file)
--- a/iostat.c
+++ b/iostat.c
@@ -59,7 +59,7 @@ extern int __env;
 struct stats_cpu *st_cpu[2];
 unsigned long long uptime_cs[2] = {0, 0};
 unsigned long long tot_jiffies[2] = {0, 0};
-struct io_device *dev_list;
+struct io_device *dev_list = NULL;
 
 /* Number of decimal places */
 int dplaces_nr = -1;