aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorNavid Emamdoost <navid.emamdoost@gmail.com>2019-10-02 16:52:37 -0500
committerDavid Sterba <dsterba@suse.com>2019-11-18 14:26:43 +0100
commit450c3d4166837c496ebce03650c08800991f2150 (patch)
treee278f03b2091e8d80bba63be71df2cd0765e1a4f /fs/open.c
parentaffs: Replace binary semaphores with mutexes (diff)
downloadlinux-dev-450c3d4166837c496ebce03650c08800991f2150.tar.xz
linux-dev-450c3d4166837c496ebce03650c08800991f2150.zip
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/open.c')
0 files changed, 0 insertions, 0 deletions