From: Miao Xie Date: Mon, 22 Jul 2013 08:36:57 +0000 (+0800) Subject: Btrfs, raid56: fix memory leak when allocating pages for p/q stripes failed X-Git-Tag: v3.12-rc2~5^2~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cd846d1d7640dd6b64d251cb9efd1a490d9a601;p=profile%2Fivi%2Fkernel-x86-ivi.git Btrfs, raid56: fix memory leak when allocating pages for p/q stripes failed Signed-off-by: Miao Xie Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 0db856c..d0ecfbd 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1540,8 +1540,10 @@ static int full_stripe_write(struct btrfs_raid_bio *rbio) int ret; ret = alloc_rbio_parity_pages(rbio); - if (ret) + if (ret) { + __free_raid_bio(rbio); return ret; + } ret = lock_stripe_add(rbio); if (ret == 0)