RTEMS | bsps/flash: Fix resource leak in flash_sim_flashdev_init (CID 1679602) (!902)
MITHILESH MATTAPALLI (@mithileshm)
gitlab at rtems.org
Sat Jan 10 18:54:06 UTC 2026
MITHILESH MATTAPALLI created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/902
Project:Branches: mithileshm/rtems:fix-flash-leak to rtems/rtos/rtems:main
Author: MITHILESH MATTAPALLI
Coverity Scan identified a resource leak in `flash_sim_flashdev_init`.
If `ntable->area` or `ntable->oob` allocation fails, the function returns NULL but previously failed to free the allocated `ftable`. This patch adds the missing `free(ftable)` calls to the error handling paths.
Closes CID 1679602.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/902
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260110/ffa4e808/attachment-0001.htm>
More information about the bugs
mailing list