RTEMS | cpukit/libblock: Fix resource leak in rtems_nvdisk_initialize (CID 1439297) (!905)

Kinsey Moore (@opticron) gitlab at rtems.org
Thu Jan 15 23:14:14 UTC 2026




Kinsey Moore started a new discussion on cpukit/libblock/src/nvdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/905#note_138828

 >      nvd->info_level   = c->info_level;
 >  
 >      nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
 > -    if (!nvd->devices)
 > +    if (!nvd->devices) {
 > +      free (nvd_start);

nvd[]->devices needs to be freed for previous entries.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/905#note_138828
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/20260115/befd6d1d/attachment.htm>


More information about the bugs mailing list