quota: Fix memory leak when handling corrupted quota file
authorJan Kara <jack@suse.cz>
Tue, 22 Dec 2020 11:09:53 +0000 (12:09 +0100)
committerJan Kara <jack@suse.cz>
Tue, 5 Jan 2021 13:42:18 +0000 (14:42 +0100)
commita4db1072e1a3bd7a8d9c356e1902b13ac5deb8ef
tree6f9fc68d5b3bc429a18598e9558881af5fa7cff2
parent36bbbd0e234d817938bdc52121a0f5473b3e58f5
quota: Fix memory leak when handling corrupted quota file

When checking corrupted quota file we can bail out and leak allocated
info structure. Properly free info structure on error return.

Reported-by: syzbot+77779c9b52ab78154b08@syzkaller.appspotmail.com
Fixes: 11c514a99bb9 ("quota: Sanity-check quota file headers on load")
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/quota_v2.c