diff options
author | Neil Brown <neilb@suse.de> | 2008-05-27 09:18:37 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-05-27 09:18:37 +1000 |
commit | d52690acc48b3dcea1785d038fa12fc3de11d0a1 (patch) | |
tree | 8fc02010bfdc18b899eb50290ba8f76d412ab953 /managemon.c | |
parent | 5d19760db0541a399e08f2b005d07e607400604d (diff) | |
download | mdadm-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.c | 2 |
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; |