summaryrefslogtreecommitdiff
path: root/fs/overlayfs/namei.c
diff options
context:
space:
mode:
authorNavid Emamdoost <navid.emamdoost@gmail.com>2019-10-03 00:52:37 +0300
committerDavid Sterba <dsterba@suse.com>2019-11-18 16:26:43 +0300
commit450c3d4166837c496ebce03650c08800991f2150 (patch)
treee278f03b2091e8d80bba63be71df2cd0765e1a4f /fs/overlayfs/namei.c
parent6060c07d476ebb1f21d28db5ba852e911246ce79 (diff)
downloadlinux-450c3d4166837c496ebce03650c08800991f2150.tar.xz
affs: fix a memory leak in affs_remount
In affs_remount if data is provided it is duplicated into new_opts. The allocated memory for new_opts is only released if parse_options fails. There's a bit of history behind new_options, originally there was save/replace options on the VFS layer so the 'data' passed must not change (thus strdup), this got cleaned up in later patches. But not completely. There's no reason to do the strdup in cases where the filesystem does not need to reuse the 'data' again, because strsep would modify it directly. Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling") Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> [ update changelog ] Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/overlayfs/namei.c')
0 files changed, 0 insertions, 0 deletions