projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd2ae2
)
Btrfs: fix memory leak in btrfs_parse_early_options()
author
Ilya Dryomov
<idryomov@gmail.com>
Tue, 8 Nov 2011 14:47:55 +0000
(16:47 +0200)
committer
Ilya Dryomov
<idryomov@gmail.com>
Wed, 9 Nov 2011 20:53:38 +0000
(22:53 +0200)
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>
fs/btrfs/super.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/super.c
b/fs/btrfs/super.c
index dcd5aef6b6148adf6e684e55dcc3dbf04db2b094..6befcaf253bd7e03175b5a1a241c227827d84a81 100644
(file)
--- a/
fs/btrfs/super.c
+++ b/
fs/btrfs/super.c
@@
-448,6
+448,7
@@
static int btrfs_parse_early_options(const char *options, fmode_t flags,
token = match_token(p, tokens, args);
switch (token) {
case Opt_subvol:
+ kfree(*subvol_name);
*subvol_name = match_strdup(&args[0]);
break;
case Opt_subvolid: