f2fs: fix to verify tpage before releasing in f2fs_free_dic()
authorChao Yu <yuchao0@huawei.com>
Thu, 26 Mar 2020 09:42:26 +0000 (17:42 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 3 Apr 2020 17:21:31 +0000 (10:21 -0700)
commit8908e753109fd7abb4949a3d6118a9a5e3766ea0
tree04797ae33134e092a4f25ac8a2f5dec108d0b0f7
parentfd26725f6eafa84cb112ee889b2765b57e1263d8
f2fs: fix to verify tpage before releasing in f2fs_free_dic()

In below error path, tpages[i] could be NULL, fix to check it before
releasing it.
- f2fs_read_multi_pages
 - f2fs_alloc_dic
  - f2fs_free_dic

Fixes: 61fbae2b2b12 ("f2fs: fix to avoid NULL pointer dereference")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/compress.c