summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-03-04 08:58:34 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2021-03-04 08:58:34 -0500
commit15b4d229139d2f596ba18ca3331f0ce9c7134cb4 (patch)
tree323860f65db56a78d1ec21dc19780986b7632b72
parent80be135d0d39d8f4640e33315c2c04968d024a01 (diff)
downloadrockbox-15b4d229139d2f596ba18ca3331f0ce9c7134cb4.tar.gz
rockbox-15b4d229139d2f596ba18ca3331f0ce9c7134cb4.zip
ROLO check for OOM
Splqash failure and return on OOM Change-Id: I97b8783ba42545e30a5639e8a751d1e6834aebc8
-rw-r--r--firmware/rolo.c6
1 files changed, 6 insertions, 0 deletions
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)
243 /* get the system buffer. release only in case of error, otherwise 243 /* get the system buffer. release only in case of error, otherwise
244 * we don't return anyway */ 244 * we don't return anyway */
245 rolo_handle = core_alloc_maximum("rolo", &filebuf_size, NULL); 245 rolo_handle = core_alloc_maximum("rolo", &filebuf_size, NULL);
246 if (rolo_handle < 0)
247 {
248 splash(HZ, "Rolo Failed - OOM");
249 return -1;
250 }
251
246 filebuf = core_get_data(rolo_handle); 252 filebuf = core_get_data(rolo_handle);
247 253
248 err = LOAD_FIRMWARE(filebuf, filename, filebuf_size); 254 err = LOAD_FIRMWARE(filebuf, filename, filebuf_size);