RTEMS | bsps/flash: Fix resource leak in flash_sim_flashdev_init (CID 1679602) (!902)

Kinsey Moore (@opticron) gitlab at rtems.org
Mon Jan 12 14:48:55 UTC 2026




Kinsey Moore started a new discussion on bsps/shared/dev/flash/flash_sim_flashdev.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/902#note_138457

 >    ntable->area = flashdev_malloc( &ntable->attr, total_pages * ntable->attr.page_size_bytes );
 >    if ( ntable->area == NULL ) {
 >      free_nand_priv( ntable );
 > +    free( ftable ); /* <--- FIXED: Prevent memory leak */

Please remove the comment on this line.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/902#note_138457
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/20260112/013337b9/attachment-0001.htm>


More information about the bugs mailing list