Skip to content

Commit 7ffec9c

Browse files
author
Kent Overstreet
committed
bcachefs: don't free error pointers
Reported-by: syzbot+3333603f569fc2ef258c@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 72e71bf commit 7ffec9c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/bcachefs/recovery.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,8 @@ int bch2_fs_recovery(struct bch_fs *c)
902902
bch2_journal_keys_put_initial(c);
903903
bch2_find_btree_nodes_exit(&c->found_btree_nodes);
904904
}
905-
kfree(clean);
905+
if (!IS_ERR(clean))
906+
kfree(clean);
906907

907908
if (!ret &&
908909
test_bit(BCH_FS_need_delete_dead_snapshots, &c->flags) &&

0 commit comments

Comments
 (0)