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 08:05:45 +0000 (09:05 +0100)
commitca6ca40e68af1da96f5d2d89d2a4195f169c9f77
treee0f3cd15ff298a59a0daa49e090bd289cc33d089
parent62bf54e887f2ae86efe8ec884dc45e6cf174e472
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