Initialise newly allocated active_array better.
Just set it all to zeros. ->devs in particular needs to be 0.
This commit is contained in:
parent
5d19760db0
commit
d52690acc4
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue