MITHILESH MATTAPALLI created a merge request: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1059

Project:Branches: mithileshm/rtems:fix-can-queue-check to rtems/rtos/rtems:main
Author:   MITHILESH MATTAPALLI



## Summary

**CID 1642607: Unchecked Return Value.**

The function `rtems_can_queue_kern_initialize` in 
`cpukit/dev/can/can-quekern.c` calls `rtems_task_start` to launch the CAN queue 
garbage collector (`can_queue_dead_func`). Previously, the return value of this 
call was ignored.

**Issue:** If this task fails to start (e.g., due to resource exhaustion), the 
CAN driver would operate without its garbage collector. This leads to silent 
memory leaks and potential system instability when connections are closed, as 
resources are never freed.

**Fix:** Added a check for `RTEMS_SUCCESSFUL`. If the task fails to start, the 
initialization function now correctly returns `-1`, propagating the error and 
preventing the driver from entering an undefined state.

## Generative AI

none used

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1059
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to