diff options
author | 2025-06-09 17:30:40 -0400 | |
---|---|---|
committer | 2025-06-11 23:21:30 -0400 | |
commit | 9e48f574e55731106b26dc33d8b0be1adedf3f20 (patch) | |
tree | 80ebee72ed56d3065df97ba2ca4574473a8143f8 | |
parent | bcachefs: Fix rcu_pending for PREEMPT_RT (diff) | |
download | wireguard-linux-9e48f574e55731106b26dc33d8b0be1adedf3f20.tar.xz wireguard-linux-9e48f574e55731106b26dc33d8b0be1adedf3f20.zip |
bcachefs: Fix leak in bch2_fs_recovery() error path
Fix a small leak of the superblock 'clean' section.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/recovery.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index 520eb72c4971..0b21fa6ff062 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -1108,9 +1108,6 @@ use_clean: out: bch2_flush_fsck_errs(c); - if (!IS_ERR(clean)) - kfree(clean); - if (!ret && test_bit(BCH_FS_need_delete_dead_snapshots, &c->flags) && !c->opts.nochanges) { @@ -1119,6 +1116,9 @@ out: } bch_err_fn(c, ret); +final_out: + if (!IS_ERR(clean)) + kfree(clean); return ret; err: fsck_err: @@ -1132,7 +1132,7 @@ fsck_err: bch2_print_str(c, KERN_ERR, buf.buf); printbuf_exit(&buf); } - return ret; + goto final_out; } int bch2_fs_initialize(struct bch_fs *c) |