From 15b4d229139d2f596ba18ca3331f0ce9c7134cb4 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 4 Mar 2021 08:58:34 -0500 Subject: ROLO check for OOM Splqash failure and return on OOM Change-Id: I97b8783ba42545e30a5639e8a751d1e6834aebc8 --- firmware/rolo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/rolo.c b/firmware/rolo.c index 50f3d68183..5cc4f1d212 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c @@ -243,6 +243,12 @@ int rolo_load(const char* filename) /* get the system buffer. release only in case of error, otherwise * we don't return anyway */ rolo_handle = core_alloc_maximum("rolo", &filebuf_size, NULL); + if (rolo_handle < 0) + { + splash(HZ, "Rolo Failed - OOM"); + return -1; + } + filebuf = core_get_data(rolo_handle); err = LOAD_FIRMWARE(filebuf, filename, filebuf_size); -- cgit v1.2.3