ntfs3: Fix memory leak in ntfs_fill_super()
Subsystems (2)
PATCH 1/1 ntfs3: Fix memory leak in ntfs_fill_super()
Mount options ptr wasn't freed before putting the superblock in ntfs_fill_super(), which resulted in a memory leak.
Bug report: https://syzkaller.appspot.com/bug?id=332ba47915d0e39e94b42a622f195f0804ecb67f
Fixes 9b75450d6c58 ("fs/ntfs3: Fix memory leak if fill_super failed")
Reported-and-tested-by [email protected]
Cc [email protected] # 5.15
Signed-off-by Siddh Raman Pant <[email protected]>
--- fs/ntfs3/super.c | 1 + 1 file changed, 1 insertion(+)
fs/ntfs3/super.c +1 -0
@@ -1281,6 +1281,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)* Free resources here. * ntfs_fs_free will be called with fc->s_fs_info = NULL */ +put_mount_options (sbi->options);put_ntfs (sbi); sb->s_fs_info =NULL ;
Signature · 1 line
2.35.1