mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
bitbang_spi.c: Fix unchecked heap allocation
Change-Id: Ib64b1fe67fa1874875453ab9e1700e468c579e7c Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/68775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
c726a693d6
commit
d127668cae
@ -165,6 +165,9 @@ int register_spi_bitbang_master(const struct bitbang_spi_master *master, void *s
|
||||
}
|
||||
|
||||
struct bitbang_spi_master_data *data = calloc(1, sizeof(*data));
|
||||
if (!data)
|
||||
return ERROR_FATAL;
|
||||
|
||||
data->master = master;
|
||||
if (spi_data)
|
||||
data->spi_data = spi_data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user