From: NeilBrown Date: Mon, 18 Aug 2014 04:48:54 +0000 (+1000) Subject: md/raid10: avoid memory leak on error path during reshape. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e337aead3aa127f083e64ad678a9e89defefcec5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index a46124ecafc7..e5037e2aadd3 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; }