Commit 6f5edbaf authored by Heinrich Schuchardt's avatar Heinrich Schuchardt 💬 Committed by Simon Glass
Browse files

firmware: smci: possible NULL dereference



sandbox_scmi_devices_ctx() may return NULL. We should not dereference this
value in sandbox_scmi_devices_remove().

The problem was indicated by 'gcc-11 -fanalyzer'.
Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
parent c30a7093
Pipeline #6206 passed with stages
in 44 minutes and 51 seconds
......@@ -50,6 +50,9 @@ static int sandbox_scmi_devices_remove(struct udevice *dev)
int ret = 0;
size_t n;
if (!devices)
return 0;
for (n = 0; n < SCMI_TEST_DEVICES_RD_COUNT; n++) {
int ret2 = reset_free(devices->reset + n);
......
Markdown is supported
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