summaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga.c
diff options
context:
space:
mode:
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>2025-06-10 12:56:32 +0300
committerTom Rini <trini@konsulko.com>2025-06-19 11:01:51 -0600
commit8bb9c275c484206c0314014d8215770aaac4cefe (patch)
tree0f6ace9a9b14066046aeb03900542df6d0084f49 /drivers/fpga/fpga.c
parent3eb43c54fadba457f22e415a2821145164efe662 (diff)
common/spl: improve error handling in spl_fit
This fix a possible NULL pointer dereference. There is also a risk of memory leaking within the same portion of code. The leak will happen if loaded image is bad or damaged. In this case u-boot-spl will try booting from the other available media. Unfortunately resources allocated for previous boot media will NOT be freed. We can't fix that issue as the memory allocation mechanism used here is unknown. It can be different kinds of malloc() or something else. To somewhat reduce memory consumption, one can try to reuse previously allocated memory as it's done in board_spl_fit_buffer_addr() from test/image/spl_load.c. The corresponding comment was put to the code as well. Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Anshul Dalal <anshuld@ti.com>
Diffstat (limited to 'drivers/fpga/fpga.c')
0 files changed, 0 insertions, 0 deletions