Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cd846d1 authored by Miao Xie's avatar Miao Xie Committed by Chris Mason
Browse files

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

parent 3dc0e818
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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)