Commit 008ae6ae authored by Xiaoke Wang's avatar Xiaoke Wang Committed by Laibin Qiu
Browse files

nfs: nfs4clinet: check the return value of kstrdup()



stable inclusion
from linux-4.19.230
commit 2c9587f72ff4b502c2fd15eb3ccff388eae12d07

--------------------------------

[ Upstream commit fbd2057e ]

kstrdup() returns NULL when some internal memory errors happen, it is
better to check the return value of it so to catch the memory error in
time.

Signed-off-by: default avatarXiaoke Wang <xkernel.wang@foxmail.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
Signed-off-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
parent 9e9b47e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment