aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2011-01-28 16:24:59 -0500
committerChris Mason <chris.mason@oracle.com>2011-01-28 16:24:59 -0500
commiteab49bec41136460b12ac0fbeceeb88386d538c7 (patch)
treed2ad3e163407d7779d53fdaa0dedcc3b934106de /fs/btrfs/super.c
parentacce952b0263825da32cf10489413dec78053347 (diff)
parent4d728ec7aefdca5419d2ebfb28c147e81a4b59f4 (diff)
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.c7
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,
383 struct btrfs_fs_devices **fs_devices) 383 struct btrfs_fs_devices **fs_devices)
384{ 384{
385 substring_t args[MAX_OPT_ARGS]; 385 substring_t args[MAX_OPT_ARGS];
386 char *opts, *p; 386 char *opts, *orig, *p;
387 int error = 0; 387 int error = 0;
388 int intarg; 388 int intarg;
389 389
@@ -397,6 +397,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
397 opts = kstrdup(options, GFP_KERNEL); 397 opts = kstrdup(options, GFP_KERNEL);
398 if (!opts) 398 if (!opts)
399 return -ENOMEM; 399 return -ENOMEM;
400 orig = opts;
400 401
401 while ((p = strsep(&opts, ",")) != NULL) { 402 while ((p = strsep(&opts, ",")) != NULL) {
402 int token; 403 int token;
@@ -432,7 +433,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags,
432 } 433 }
433 434
434 out_free_opts: 435 out_free_opts:
435 kfree(opts); 436 kfree(orig);
436 out: 437 out:
437 /* 438 /*
438 * If no subvolume name is specified we use the default one. Allocate 439 * 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,
760 } 761 }
761 762
762 btrfs_close_devices(fs_devices); 763 btrfs_close_devices(fs_devices);
764 kfree(fs_info);
765 kfree(tree_root);
763 } else { 766 } else {
764 char b[BDEVNAME_SIZE]; 767 char b[BDEVNAME_SIZE];
765 768