diff options
author | 2018-06-04 14:27:09 -0700 | |
---|---|---|
committer | 2018-06-04 14:27:09 -0700 | |
commit | e3a44fd7e63321338f652714c20a4c75bed9f60b (patch) | |
tree | bdc0cc283700a98e1dd94626a7db7e63e7af3ef5 | |
parent | Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff) | |
parent | affs: fix potential memory leak when parsing option 'prefix' (diff) | |
download | linux-dev-e3a44fd7e63321338f652714c20a4c75bed9f60b.tar.xz linux-dev-e3a44fd7e63321338f652714c20a4c75bed9f60b.zip |
Merge tag 'affs-for-4.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull affs fix from David Sterba:
"A potential memory leak fix for AFFS"
* tag 'affs-for-4.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
affs: fix potential memory leak when parsing option 'prefix'
-rw-r--r-- | fs/affs/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/affs/super.c b/fs/affs/super.c index e602619aed9d..d1ad11a8a4a5 100644 --- 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; |