mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 17:23:25 -05:00
bcachefs: Fix memleak in replicas_table_update()
Signed-off-by: Brett Holman <bholman.devel@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
c72f687a1f
commit
d7afe651ff
1 changed files with 0 additions and 7 deletions
|
@ -299,13 +299,6 @@ static int replicas_table_update(struct bch_fs *c,
|
||||||
|
|
||||||
memset(new_usage, 0, sizeof(new_usage));
|
memset(new_usage, 0, sizeof(new_usage));
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(new_usage); i++)
|
|
||||||
if (!(new_usage[i] = __alloc_percpu_gfp(bytes,
|
|
||||||
sizeof(u64), GFP_KERNEL)))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
memset(new_usage, 0, sizeof(new_usage));
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(new_usage); i++)
|
for (i = 0; i < ARRAY_SIZE(new_usage); i++)
|
||||||
if (!(new_usage[i] = __alloc_percpu_gfp(bytes,
|
if (!(new_usage[i] = __alloc_percpu_gfp(bytes,
|
||||||
sizeof(u64), GFP_KERNEL)))
|
sizeof(u64), GFP_KERNEL)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue