fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 11 Nov 2021 07:45:44 +0000 (08:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:28 +0000 (10:22 +0200)
commitd8be98ab88250dc12a98efdb703792a537b0eac3
tree4139b3d62e76979af1730b1a76144f4d65e0ac11
parent8bac05d61f26c04c79b8f4c7f37867e2884dfd86
fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'

commit e589f9b7078e1c0191613cd736f598e81d2390de upstream.

All error handling paths lead to 'out' where many resources are freed.

Do it as well here instead of a direct return, otherwise 'log', 'ra' and
'log->one_page_buf' (at least) will leak.

Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ntfs3/fslog.c