reiserfs: Fix memory leak in reiserfs_parse_options()
authorJan Kara <jack@suse.cz>
Wed, 4 Mar 2020 13:01:44 +0000 (14:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:27 +0000 (10:08 +0100)
commita527bf9df3afed54221d3d71cf88f39514797e2e
treecc876c0af23d2d2cd440078cbe944ca40ea1d94a
parent72720eaa6c337cfe0dfe2efac576124fff9bb61d
reiserfs: Fix memory leak in reiserfs_parse_options()

[ Upstream commit e9d4709fcc26353df12070566970f080e651f0c9 ]

When a usrjquota or grpjquota mount option is used multiple times, we
will leak memory allocated for the file name. Make sure the last setting
is used and all the previous ones are properly freed.

Reported-by: syzbot+c9e294bbe0333a6b7640@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/reiserfs/super.c