]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
isofs: fix potential memory leak in mount option parsing
authorChengguang Xu <cgxu519@gmx.com>
Sat, 14 Apr 2018 12:16:06 +0000 (20:16 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:54:59 +0000 (14:54 +0200)
commit2a90aedb5d5c94004446afdaa1b00ee7ad9c6268
treeea80e05bf6dc6a088fb4a12bb12fe55955c8b841
parent3eb5c35e4784b09840ede9d33e65ba3876679bc8
isofs: fix potential memory leak in mount option parsing

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 4f34a5130a471f32f2fe7750769ab4057dc3eaa0 ]

When specifying string type mount option (e.g., iocharset)
several times in a mount, current option parsing may
cause memory leak. Hence, call kfree for previous one
in this case. Meanwhile, check memory allocation result
for it.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/isofs/inode.c