boot: menu: Do not dereference pointer if pointer is NULL
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 2 Jul 2025 09:24:16 +0000 (10:24 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 9 Jul 2025 00:15:20 +0000 (18:15 -0600)
commit074e05952705972072f52128cf2e3ec2d8f35de6
tree45094c6a6d910a526fa565b55970348ce6254525
parentc3b43eeaead77beef53a224c7d13346a0462b34d
boot: menu: Do not dereference pointer if pointer is NULL

scene_obj_find can return NULL but this is not checked for before
the return is dereferenced. Add a NULL check.

This issue was found by Smatch.

Also add a NULL check for str.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
boot/scene_menu.c