]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:23:33 +0000 (09:23 +0200)
commit5e94c00d2a560a2c48d12b8f47695fea86c51899
tree7580e28ca329e38f68c344036c0052eedeb0ec7c
parent57cf2e03eb815f051758a1ae78f34cfbf1117b14
fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'

BugLink: https://bugs.launchpad.net/bugs/1981864
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/ntfs3/fslog.c