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

Commit 56d2a48f authored by Ilya Dryomov's avatar Ilya Dryomov Committed by Chris Mason
Browse files

Btrfs: fix a potential btrfs_bio leak on scrub fixups



In case we were able to map less than we wanted (length < PAGE_SIZE
clause is true) btrfs_bio is still allocated and we have to free it.

Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 21ca543e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -655,6 +655,7 @@ static void scrub_fixup(struct scrub_bio *sbio, int ix)
		       "scrub_fixup: btrfs_map_block failed us for %llu\n",
		       (unsigned long long)logical);
		WARN_ON(1);
		kfree(bbio);
		return;
	}