Btrfs, raid56: fix memory leak when allocating pages for p/q stripes failed

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
Miao Xie 2013-07-22 16:36:57 +08:00 committed by Chris Mason
parent 3dc0e818af
commit 3cd846d1d7
1 changed files with 3 additions and 1 deletions

View File

@ -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)