Commit ea5bc6f5 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Greg Kroah-Hartman
Browse files

of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()



[ Upstream commit d6ce4f0e ]

when kmalloc() fail to allocate memory in kasprintf(), name
or full_name will be NULL, strcmp() will cause
null pointer dereference.

Fixes: 0d638a07 ("of: Convert to using %pOF instead of full_name")
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230727080246.519539-1-ruanjinjie@huawei.com


Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4197eeb5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment