Commit a90e8b6fb80db43b029e1e76205452afa8bdc77a

Authored by Ilya Dryomov
1 parent 7fd2ae21a4

Btrfs: fix memory leak in btrfs_parse_early_options()

Don't leak subvol_name string in case multiple subvol= options are
given.  "The lastest option is effective" behavior (consistent with
subvolid= and subvolrootid= options) is preserved.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -448,6 +448,7 @@
448 448 token = match_token(p, tokens, args);
449 449 switch (token) {
450 450 case Opt_subvol:
  451 + kfree(*subvol_name);
451 452 *subvol_name = match_strdup(&args[0]);
452 453 break;
453 454 case Opt_subvolid: