Commit d6ce4f0e authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Rob Herring
Browse files

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

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>
parent 3e773081
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment