summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-05-27 09:18:37 +1000
committerNeil Brown <neilb@suse.de>2008-05-27 09:18:37 +1000
commitd52690acc48b3dcea1785d038fa12fc3de11d0a1 (patch)
tree8fc02010bfdc18b899eb50290ba8f76d412ab953 /managemon.c
parent5d19760db0541a399e08f2b005d07e607400604d (diff)
downloadmdadm-d52690acc48b3dcea1785d038fa12fc3de11d0a1.tar.gz
mdadm-d52690acc48b3dcea1785d038fa12fc3de11d0a1.tar.xz
mdadm-d52690acc48b3dcea1785d038fa12fc3de11d0a1.zip
Initialise newly allocated active_array better.
Just set it all to zeros. ->devs in particular needs to be 0.
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/managemon.c b/managemon.c
index ae4ceb5..c771104 100644
--- a/managemon.c
+++ b/managemon.c
@@ -203,6 +203,8 @@ static void manage_new(struct mdstat_ent *mdstat,
new = malloc(sizeof(*new));
+ memset(new, 0, sizeof(*new));
+
new->devnum = mdstat->devnum;
new->prev_state = new->curr_state = new->next_state = inactive;