Commit e4494770 authored by Su Hui's avatar Su Hui Committed by Konstantin Komarov

fs/ntfs3: Avoid possible memory leak

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: default avatarSu Hui <suhui@nfschina.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 85a4780d
......@@ -2168,8 +2168,10 @@ static int last_log_lsn(struct ntfs_log *log)
if (!page) {
page = kmalloc(log->page_size, GFP_NOFS);
if (!page)
return -ENOMEM;
if (!page) {
err = -ENOMEM;
goto out;
}
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment