ROLO check for OOM

Splqash failure and return on OOM

Change-Id: I97b8783ba42545e30a5639e8a751d1e6834aebc8
This commit is contained in:
William Wilgus 2021-03-04 08:58:34 -05:00
parent 80be135d0d
commit 15b4d22913

View file

@ -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);