summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-08-18 04:48:54 (GMT)
committerNeilBrown <neilb@suse.de>2014-08-19 07:20:27 (GMT)
commite337aead3aa127f083e64ad678a9e89defefcec5 (patch)
tree6e36cb7b427f96f1ede599a0ca20e19e27c819d2 /drivers/md/raid10.c
parentb39685526f46976bcd13aa08c82480092befa46c (diff)
downloadlinux-e337aead3aa127f083e64ad678a9e89defefcec5.tar.xz
md/raid10: avoid memory leak on error path during reshape.
If raid10 reshape fails to find somewhere to read a block from, it returns without freeing memory... Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index a46124e..e5037e2 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -4399,6 +4399,7 @@ read_more:
* on all the target devices.
*/
// FIXME
+ mempool_free(r10_bio, conf->r10buf_pool);
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
return sectors_done;
}