RTEMS | cpukit/libblock: Fix resource leak in rtems_fdisk_initialize (!903)
Gedare Bloom (@gedare)
gitlab at rtems.org
Wed Mar 4 22:07:59 UTC 2026
Gedare Bloom started a new discussion on cpukit/libblock/src/flashdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/903#note_144262
> +
> + clean_name[ sizeof( RTEMS_FLASHDISK_DEVICE_BASE_NAME ) - 1 ] += i;
> + unlink( clean_name );
> +
> + rtems_mutex_destroy( &p->lock );
> + if ( p->devices ) {
> + for ( d = 0; d < p->device_count; d++ ) {
> + free( p->devices[ d ].segments );
> + }
> + free( p->devices );
> + }
> + free( p->blocks );
> + free( p->copy_buffer );
> + }
> +
> + if ( fd ) {
Isn't `fd` one of the `fds`?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/903#note_144262
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/20260304/24c679c8/attachment-0001.htm>
More information about the bugs
mailing list