RTEMS | libblock: Return RTEMS_NO_MEMORY on allocation failure (!1388)
Yang Zhang (@Chloe)
gitlab at rtems.org
Mon Aug 3 02:09:58 UTC 2026
Yang Zhang created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1388
Project:Branches: Chloe/rtems:fix-bdpart-register-error-code to rtems/rtos/rtems:main
Author: Yang Zhang
## Summary
In rtems_bdpart_register(), when create_logical_disk_name() fails to allocate memory and returns NULL, the error code variable 'esc' was incorrectly assigned 'sc' (which evaluates to RTEMS_SUCCESSFUL).
This caused the function to falsely return RTEMS_SUCCESSFUL even when memory allocation failed. Fix it by assigning RTEMS_NO_MEMORY.
## Generative AI
None
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1388
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-2gwznank7ruq6c418v2ste6c8-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260803/ae73038c/attachment-0001.htm>
More information about the bugs
mailing list