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: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230727080246.519539-1-ruanjinjie@huawei.comSigned-off-by: Rob Herring <robh@kernel.org>
Showing
Please register or sign in to comment