mirror of
https://github.com/apache/nuttx.git
synced 2026-08-20 13:08:26 +00:00
sched/pidhash: init g_pidhash to NULL to avoid wild pointer
Change-Id: Icbc70a850efb47eaaf942711430c72980c4bb95c Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
269266638b
commit
3118efa317
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ FAR struct tcb_s *nxsched_get_tcb(pid_t pid)
|
|||
|
||||
/* Verify that the correct TCB was found. */
|
||||
|
||||
if (pid == g_pidhash[hash_ndx].pid)
|
||||
if (g_pidhash && pid == g_pidhash[hash_ndx].pid)
|
||||
{
|
||||
/* Return the TCB associated with this pid (if any) */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue