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)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 23 Nov 2021 15:03:47 +0000 (18:03 +0300)
commite589f9b7078e1c0191613cd736f598e81d2390de
treefe02d8d0fd08544dadc2f18776015e8c7d27ca52
parent8bb7eca972ad531c9b149c0a51ab43a417385813
fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'

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>
fs/ntfs3/fslog.c