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

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
				}
			}

			/*