diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c index aae1f32f4dab..f193912d8632 100644 --- a/fs/ntfs3/super.c +++ b/fs/ntfs3/super.c @@ -704,8 +704,8 @@ static void ntfs_put_super(struct super_block *sb) ntfs_set_state(sbi, NTFS_DIRTY_CLEAR); if (sbi->options) { + kfree(sbi->options->nls_name); unload_nls(sbi->options->nls); - kfree(sbi->options->nls); kfree(sbi->options); sbi->options = NULL; } @@ -1670,8 +1670,8 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) iput(inode); out: if (sbi && sbi->options) { + kfree(sbi->options->nls_name); unload_nls(sbi->options->nls); - kfree(sbi->options->nls); kfree(sbi->options); sbi->options = NULL; }