In one case we called 'free' instead of 'mdstat_free'.
In others we didn't free at all.
Signed-off-by: NeilBrown <neilb@suse.de>
free_mdstat(ms);
return rv;
}
- free(ms);
+ free_mdstat(ms);
rv = 0;
mdstat_wait(5);
}
break;
}
}
+ free_mdstat(mdstat);
map_write(map);
map_free(map);
}
export, test, homehost);
put_md_name(name);
}
+ free_mdstat(ms);
} else if (devmode == 'S' && scan) {
/* apply --stop to all devices in /proc/mdstat */
/* Due to possible stacking of devices, repeat until
put_md_name(name);
}
+ free_mdstat(ms);
} while (!last && err);
if (err) rv |= 1;
} else {