search for: out_free_opt

Displaying 2 results from an estimated 2 matches for "out_free_opt".

Did you mean: out_free_opts
2011 Sep 13
5
[PATCH] btrfs: trivial fix, a potential memory leak in btrfs_parse_early_options()
...ions, fmode_t flags, } break; case Opt_device: - error = btrfs_scan_one_device(match_strdup(&args[0]), + device_name = match_strdup(&args[0]); + if (!device_name) { + error = -ENOMEM; + goto out_free_opts; + } + error = btrfs_scan_one_device(device_name, flags, holder, fs_devices); + kfree(device_name); if (error) goto out_free_opts; break; -- 1.7.4.1 -- To unsubscribe from this list: send the lin...
2008 Jun 10
1
[PATCH, RFC] btrfs: allow scanning multiple devices during mount
...char *opts, *p; @@ -240,11 +243,18 @@ static int btrfs_parse_early_options(con case Opt_subvol: *subvol_name = match_strdup(&args[0]); break; + case Opt_device: + error = btrfs_scan_one_device(match_strdup(&args[0]), + flags, holder, fs_devices); + if (error) + goto out_free_opts; + break; default: break; } } + out_free_opts: kfree(opts); out: /* @@ -380,7 +390,8 @@ static int btrfs_get_sb(struct file_syst struct btrfs_fs_devices *fs_devices = NULL; int error = 0; - error = btrfs_parse_early_options(data, &subvol_name); + error = btrfs_parse...