mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
fs/ntfs3: Avoid possible memory leak
[ Upstream commit e4494770a5 ]
smatch warn:
fs/ntfs3/fslog.c:2172 last_log_lsn() warn: possible memory leak of 'page_bufs'
Jump to label 'out' to free 'page_bufs' and is more consistent with
other code.
Signed-off-by: Su Hui <suhui@nfschina.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
84aabd18c8
commit
6a7a2d5a08
@@ -2169,8 +2169,10 @@ file_is_valid:
|
||||
|
||||
if (!page) {
|
||||
page = kmalloc(log->page_size, GFP_NOFS);
|
||||
if (!page)
|
||||
return -ENOMEM;
|
||||
if (!page) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user