diff options
Diffstat (limited to 'fs/affs/super.c')
-rw-r--r-- | fs/affs/super.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c index 9c3080716c92..aaec015a16e4 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c | |||
@@ -35,8 +35,7 @@ affs_put_super(struct super_block *sb) | |||
35 | mark_buffer_dirty(sbi->s_root_bh); | 35 | mark_buffer_dirty(sbi->s_root_bh); |
36 | } | 36 | } |
37 | 37 | ||
38 | if (sbi->s_prefix) | 38 | kfree(sbi->s_prefix); |
39 | kfree(sbi->s_prefix); | ||
40 | affs_free_bitmap(sb); | 39 | affs_free_bitmap(sb); |
41 | affs_brelse(sbi->s_root_bh); | 40 | affs_brelse(sbi->s_root_bh); |
42 | kfree(sbi); | 41 | kfree(sbi); |
@@ -198,10 +197,9 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s | |||
198 | *mount_opts |= SF_MUFS; | 197 | *mount_opts |= SF_MUFS; |
199 | break; | 198 | break; |
200 | case Opt_prefix: | 199 | case Opt_prefix: |
201 | if (*prefix) { /* Free any previous prefix */ | 200 | /* Free any previous prefix */ |
202 | kfree(*prefix); | 201 | kfree(*prefix); |
203 | *prefix = NULL; | 202 | *prefix = NULL; |
204 | } | ||
205 | *prefix = match_strdup(&args[0]); | 203 | *prefix = match_strdup(&args[0]); |
206 | if (!*prefix) | 204 | if (!*prefix) |
207 | return 0; | 205 | return 0; |
@@ -462,11 +460,9 @@ got_root: | |||
462 | out_error: | 460 | out_error: |
463 | if (root_inode) | 461 | if (root_inode) |
464 | iput(root_inode); | 462 | iput(root_inode); |
465 | if (sbi->s_bitmap) | 463 | kfree(sbi->s_bitmap); |
466 | kfree(sbi->s_bitmap); | ||
467 | affs_brelse(root_bh); | 464 | affs_brelse(root_bh); |
468 | if (sbi->s_prefix) | 465 | kfree(sbi->s_prefix); |
469 | kfree(sbi->s_prefix); | ||
470 | kfree(sbi); | 466 | kfree(sbi); |
471 | sb->s_fs_info = NULL; | 467 | sb->s_fs_info = NULL; |
472 | return -EINVAL; | 468 | return -EINVAL; |