mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
bcachefs: Fix some small memory leaks
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
ae8bbb9fac
commit
f24fab9cba
2 changed files with 4 additions and 2 deletions
|
@ -1124,6 +1124,8 @@ static int check_directory_structure(struct bch_fs *c,
|
|||
|
||||
BUG_ON(ret == -EINTR);
|
||||
|
||||
kfree(path.entries);
|
||||
|
||||
return bch2_trans_exit(&trans) ?: ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -320,8 +320,8 @@ static int replicas_table_update(struct bch_fs *c,
|
|||
out:
|
||||
free_percpu(new_gc);
|
||||
kfree(new_scratch);
|
||||
free_percpu(new_usage[1]);
|
||||
free_percpu(new_usage[0]);
|
||||
for (i = 0; i < ARRAY_SIZE(new_usage); i++)
|
||||
free_percpu(new_usage[i]);
|
||||
kfree(new_base);
|
||||
return ret;
|
||||
err:
|
||||
|
|
Loading…
Add table
Reference in a new issue