mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
dm btree: fix leak of bufio-backed block in btree_split_beneath error path
btree_split_beneath()'s error path had an outstanding FIXME that speaks directly to the potential for _not_ cleaning up a previously allocated bufio-backed block. Fix this by releasing the previously allocated bufio block using unlock_block(). Reported-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> Acked-by: Joe Thornber <[email protected]> Cc: [email protected]
This commit is contained in:
1 parent
2871c69e02
commit
4dcb8b57df
1 file changed
+1
-1
@@ -523,7 +523,7 @@ static int btree_split_beneath(struct shadow_spine *s, uint64_t key)
|
||||
|
||||
r = new_block(s->info, &right);
|
||||
if (r < 0) {
|
||||
/* FIXME: put left */
|
||||
unlock_block(s->info, left);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user