Commit 84ae6f82 authored by Chengguang Xu's avatar Chengguang Xu Committed by David Sterba

affs: fix potential memory leak when parsing option 'prefix'

When specifying option 'prefix' multiple times, current option parsing
will cause memory leak.  Hence, call kfree for previous one in this
Signed-off-by: 's avatarChengguang Xu <>
Signed-off-by: 's avatarDavid Sterba <>
parent b5069438
......@@ -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);
case Opt_prefix:
*prefix = match_strdup(&args[0]);
if (!*prefix)
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment