RTEMS | cpukit/libblock: Fixes off-by-1 and memory in flashdisk (!912)

Prakhar Kumar (@prakhar) gitlab at rtems.org
Sat Apr 4 13:51:16 UTC 2026




Prakhar Kumar commented on a discussion on cpukit/libblock/src/flashdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/912#note_148047

 > +    free( fd->devices );
 > +    fd->devices = NULL;
 > +  }
 > +
 > +  free( fd->blocks );
 > +  fd->blocks = NULL;
 > +
 > +  free( fd->copy_buffer );
 > +  fd->copy_buffer = NULL;
 > +}
 > +
 > +static void rtems_fdisk_cleanup( rtems_flashdisk *base, uint32_t count )
 > +{
 > +  rtems_flashdisk  *base_fd = base;
 > +  for( uint32_t i = count+1; i>0; i-- ) {
 > +    rtems_fdisk_cleanup_helper( &base[i-1] );

Made the changes

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/912#note_148047
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/20260404/6ac6e5c1/attachment-0001.htm>


More information about the bugs mailing list