RTEMS | nvdisk.c: Fixed garbage name generation and added memory cleanup (!906)
Kinsey Moore (@opticron)
gitlab at rtems.org
Wed Jan 14 21:21:39 UTC 2026
Kinsey Moore started a new discussion on cpukit/libblock/src/nvdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/906#note_138675
> nvd = calloc (rtems_nvdisk_configuration_size, sizeof (*nvd));
> if (!nvd)
> return RTEMS_NO_MEMORY;
> -
> + b_nvd = nvd;
> for (i = 0; i < rtems_nvdisk_configuration_size; i++, c++, nvd++)
> {
> char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
> uint32_t device;
> uint32_t blocks = 0;
>
> - name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += i;
> + name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)-1] += i;
Please add spaces on this line consistent with the formatting guidelines. It should be:
`name[sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME) - 1] += i;`
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/906#note_138675
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/20260114/582c011d/attachment-0001.htm>
More information about the bugs
mailing list