Commit f24fab9c authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix some small memory leaks

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent ae8bbb9f
...@@ -1124,6 +1124,8 @@ static int check_directory_structure(struct bch_fs *c, ...@@ -1124,6 +1124,8 @@ static int check_directory_structure(struct bch_fs *c,
BUG_ON(ret == -EINTR); BUG_ON(ret == -EINTR);
kfree(path.entries);
return bch2_trans_exit(&trans) ?: ret; return bch2_trans_exit(&trans) ?: ret;
} }
......
...@@ -320,8 +320,8 @@ static int replicas_table_update(struct bch_fs *c, ...@@ -320,8 +320,8 @@ static int replicas_table_update(struct bch_fs *c,
out: out:
free_percpu(new_gc); free_percpu(new_gc);
kfree(new_scratch); kfree(new_scratch);
free_percpu(new_usage[1]); for (i = 0; i < ARRAY_SIZE(new_usage); i++)
free_percpu(new_usage[0]); free_percpu(new_usage[i]);
kfree(new_base); kfree(new_base);
return ret; return ret;
err: err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment