mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 15:47:36 +00: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:
parent
27a0bed128
commit
64ae128b09
1 changed files with 4 additions and 2 deletions
|
@ -2169,8 +2169,10 @@ static int last_log_lsn(struct ntfs_log *log)
|
||||||
|
|
||||||
if (!page) {
|
if (!page) {
|
||||||
page = kmalloc(log->page_size, GFP_NOFS);
|
page = kmalloc(log->page_size, GFP_NOFS);
|
||||||
if (!page)
|
if (!page) {
|
||||||
return -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue