summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-08-23 20:19:26 +1000
committerNeilBrown <neilb@suse.de>2014-10-14 13:08:28 +1100
commitc4796e215f487de9bc93731a81e885ac866ef7dc (patch)
tree5660b51035bd3dd227ed873d7a2202ec7662b9fe /drivers/md/raid10.c
parent3fd83717e47687817f5d3e45696bf22456d8b422 (diff)
md/raid10: another memory leak due to reshape.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index a2788bcf75b2..8fa37eceaef3 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -3834,6 +3834,8 @@ static int stop(struct mddev *mddev)
mempool_destroy(conf->r10bio_pool);
safe_put_page(conf->tmppage);
kfree(conf->mirrors);
+ kfree(conf->mirrors_old);
+ kfree(conf->mirrors_new);
kfree(conf);
mddev->private = NULL;
return 0;
@@ -4121,7 +4123,7 @@ static int raid10_start_reshape(struct mddev *mddev)
memcpy(conf->mirrors_new, conf->mirrors,
sizeof(struct raid10_info)*conf->prev.raid_disks);
smp_mb();
- kfree(conf->mirrors_old); /* FIXME and elsewhere */
+ kfree(conf->mirrors_old);
conf->mirrors_old = conf->mirrors;
conf->mirrors = conf->mirrors_new;
conf->mirrors_new = NULL;