diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-01-28 22:24:59 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-01-28 22:24:59 +0100 |
commit | eab49bec41136460b12ac0fbeceeb88386d538c7 (patch) | |
tree | d2ad3e163407d7779d53fdaa0dedcc3b934106de /fs/btrfs/super.c | |
parent | Btrfs: forced readonly mounts on errors (diff) | |
parent | Btrfs: Fix file clone when source offset is not 0 (diff) | |
download | linux-eab49bec41136460b12ac0fbeceeb88386d538c7.tar.xz linux-eab49bec41136460b12ac0fbeceeb88386d538c7.zip |
Merge branch 'bug-fixes' of git://repo.or.cz/linux-btrfs-devel into btrfs-38
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 52e903b0a293..f4e45fdded30 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -383,7 +383,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, struct btrfs_fs_devices **fs_devices) { substring_t args[MAX_OPT_ARGS]; - char *opts, *p; + char *opts, *orig, *p; int error = 0; int intarg; @@ -397,6 +397,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, opts = kstrdup(options, GFP_KERNEL); if (!opts) return -ENOMEM; + orig = opts; while ((p = strsep(&opts, ",")) != NULL) { int token; @@ -432,7 +433,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, } out_free_opts: - kfree(opts); + kfree(orig); out: /* * If no subvolume name is specified we use the default one. Allocate @@ -760,6 +761,8 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags, } btrfs_close_devices(fs_devices); + kfree(fs_info); + kfree(tree_root); } else { char b[BDEVNAME_SIZE]; |