ntfs3: put resources during ntfs_fill_super()

During ntfs_fill_super() some resources are allocated that we need to
cleanup in ->put_super() such as additional inodes. When
ntfs_fill_super() fails these resources need to be cleaned up as well.

Reported-by: syzbot+2751da923b5eb8307b0b@syzkaller.appspotmail.com
Fixes: 78a06688a4 ("ntfs3: drop inode references in ntfs_put_super()")
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Christian Brauner 2023-09-25 13:08:52 +02:00
parent 2d1b3bbc3d
commit 493c71926c
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2

View file

@ -1562,6 +1562,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
put_inode_out:
iput(inode);
out:
ntfs3_put_sbi(sbi);
kfree(boot2);
return err;
}