board/rtl8721csm/osif_tizenrt.c : Add NULL check after sched_gettcb
WID:12571276 Return value of a function 'sched_gettcb' is dereferenced at osif_tizenrt.c:207 without checking, but it is usually checked for this function (41/42).
@@ -223,6 +223,10 @@ bool osif_task_priority_set(void *p_handle, uint16_t priority)
}
p_tcb = sched_gettcb(pid);
+ if (!p_tcb) {
+ printf("[osif_task_priority_set] pid %d tcb is NULL\r\n", pid);
+ return _FAIL;
+ }
priority = (priority + SCHED_PRIORITY_DEFAULT > SCHED_PRIORITY_MAX || priority + SCHED_PRIORITY_DEFAULT < SCHED_PRIORITY_MIN)? SCHED_PRIORITY_DEFAULT : priority + SCHED_PRIORITY_DEFAULT;
