f2fs: fix double free of unicode map
authorHyeongseok Kim <hyeongseok@gmail.com>
Thu, 12 Nov 2020 09:14:54 +0000 (18:14 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 3 Dec 2020 06:00:20 +0000 (22:00 -0800)
commit89ff6005039a878afac87889fee748fa3f957c3a
treeae2e80cc688249a28f8a2c6e25a431bccf4d78e8
parent34178b1bc4b5c936eab3adb4835578093095a571
f2fs: fix double free of unicode map

In case of retrying fill_super with skip_recovery,
s_encoding for casefold would not be loaded again even though it's
already been freed because it's not NULL.
Set NULL after free to prevent double freeing when unmount.

Fixes: eca4873ee1b6 ("f2fs: Use generic casefolding support")
Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c