File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -273,9 +273,8 @@ static int exfat_parse_param(struct fs_context *fc, struct fs_parameter *param)
273
273
break ;
274
274
case Opt_charset :
275
275
exfat_free_iocharset (sbi );
276
- opts -> iocharset = kstrdup (param -> string , GFP_KERNEL );
277
- if (!opts -> iocharset )
278
- return - ENOMEM ;
276
+ opts -> iocharset = param -> string ;
277
+ param -> string = NULL ;
279
278
break ;
280
279
case Opt_errors :
281
280
opts -> errors = result .uint_32 ;
@@ -686,7 +685,12 @@ static int exfat_get_tree(struct fs_context *fc)
686
685
687
686
static void exfat_free (struct fs_context * fc )
688
687
{
689
- kfree (fc -> s_fs_info );
688
+ struct exfat_sb_info * sbi = fc -> s_fs_info ;
689
+
690
+ if (sbi ) {
691
+ exfat_free_iocharset (sbi );
692
+ kfree (sbi );
693
+ }
690
694
}
691
695
692
696
static const struct fs_context_operations exfat_context_ops = {
You can’t perform that action at this time.
0 commit comments