]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Initialise newly allocated active_array better.
authorNeil Brown <neilb@suse.de>
Mon, 26 May 2008 23:18:37 +0000 (09:18 +1000)
committerNeil Brown <neilb@suse.de>
Mon, 26 May 2008 23:18:37 +0000 (09:18 +1000)
Just set it all to zeros.  ->devs in particular needs to be 0.

managemon.c

index ae4ceb5230b3873d2dfed5b7b9c9931286cd8b45..c7711040f89f4520ffff5879506b7ca19cf598ec 100644 (file)
@@ -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;