mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02: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
|
|
@ -299,13 +299,6 @@ static int replicas_table_update(struct bch_fs *c,
|
|||
|
||||
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++)
|
||||
if (!(new_usage[i] = __alloc_percpu_gfp(bytes,
|
||||
sizeof(u64), GFP_KERNEL)))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user