projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b506943
)
affs: fix potential memory leak when parsing option 'prefix'
author
Chengguang Xu
<cgxu519@gmx.com>
Tue, 22 May 2018 04:24:25 +0000
(12:24 +0800)
committer
David Sterba
<dsterba@suse.com>
Mon, 28 May 2018 10:36:41 +0000
(12:36 +0200)
When specifying option 'prefix' multiple times, current option parsing
will cause memory leak. Hence, call kfree for previous one in this
case.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/affs/super.c
patch
|
blob
|
history
diff --git
a/fs/affs/super.c
b/fs/affs/super.c
index e602619aed9de905ae6d1fcfb7a02a911dff0f5f..d1ad11a8a4a59c2d7de3e854cfeb8b28716be59d 100644
(file)
--- a/
fs/affs/super.c
+++ b/
fs/affs/super.c
@@
-241,6
+241,7
@@
parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved,
affs_set_opt(*mount_opts, SF_NO_TRUNCATE);
break;
case Opt_prefix:
+ kfree(*prefix);
*prefix = match_strdup(&args[0]);
if (!*prefix)
return 0;