Edward O'Callaghan has uploaded this change for review.
bitbang_spi.c: Fix unchecked heap allocation
Change-Id: Ib64b1fe67fa1874875453ab9e1700e468c579e7c
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M bitbang_spi.c
1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/75/68775/1
diff --git a/bitbang_spi.c b/bitbang_spi.c
index 10c1087..5e4b566 100644
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -165,6 +165,9 @@
}
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;
To view, visit change 68775. To unsubscribe, or for help writing mail filters, visit settings.