]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Fri, 30 Oct 2020 09:38:31 +0000 (10:38 +0100)
commit7f1fabf39f739543ee7a518b5c42566a2c0d5efd
tree39513c8daa01cb3618521edcdc3a6cbbc68a8ad2
parent796f0d39dcd58e91994f4f86525d09c9e03de293
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