mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
coverity: Dereferencing after a null check (FORWARD_NULL)
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
Add proper null pointer validation and fix potential dereference after null check in scheduler critical sections. This addresses Coverity FORWARD_NULL defect by ensuring pointers are checked before use and maintaining defensive coding practices throughout the scheduler implementation. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -96,7 +96,7 @@ bool nxsched_merge_pending(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
for (;
|
for (;
|
||||||
(rtcb && ptcb->sched_priority <= rtcb->sched_priority);
|
(ptcb->sched_priority <= rtcb->sched_priority);
|
||||||
rtcb = rtcb->flink)
|
rtcb = rtcb->flink)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user