Initialise newly allocated active_array better.

Just set it all to zeros.  ->devs in particular needs to be 0.
This commit is contained in:
Neil Brown 2008-05-27 09:18:37 +10:00
parent 5d19760db0
commit d52690acc4
1 changed files with 2 additions and 0 deletions

View 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;