RTEMS | nvdisk.c: Fixed garbage name generation and added memory cleanup (!906)
Prakhar Kumar (@prakhar)
gitlab at rtems.org
Thu Jan 15 06:28:09 UTC 2026
Prakhar Kumar commented on a discussion on cpukit/libblock/src/nvdisk.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/906#note_138700
> 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;
I made the stated changes. Can you review it if it needs any further changes?
Thank you.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/906#note_138700
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/02f209cb/attachment.htm>
More information about the bugs
mailing list