fs/ntfs3: Add check for kmemdup
authorJiasheng Jiang <jiasheng@iscas.ac.cn>
Wed, 23 Nov 2022 08:48:46 +0000 (16:48 +0800)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Mon, 27 Mar 2023 12:59:08 +0000 (16:59 +0400)
commite6c3cef24cb0d045f99d5cb039b344874e3cfd74
treec162f364cfd5836d7d8f78ddd4157739727354e1
parentbfa434c60157c9793e9b12c9b68ade02aff9f803
fs/ntfs3: Add check for kmemdup

Since the kmemdup may return NULL pointer,
it should be better to add check for the return value
in order to avoid NULL pointer dereference.

Fixes: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/fslog.c