sched: Fix crash on early syslog message with prepended process name
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
bed8161202
commit
b145ad82b7
@ -56,9 +56,11 @@ FAR struct tcb_s *nxsched_get_tcb(pid_t pid)
|
||||
irqstate_t flags;
|
||||
int hash_ndx;
|
||||
|
||||
/* Verify that the PID is within range */
|
||||
/* Verify whether g_pidhash hash table has already been allocated and
|
||||
* whether the PID is within range.
|
||||
*/
|
||||
|
||||
if (pid >= 0)
|
||||
if (g_pidhash != NULL && pid >= 0)
|
||||
{
|
||||
/* The test and the return setup should be atomic. This still does
|
||||
* not provide proper protection if the recipient of the TCB does not
|
||||
|
Loading…
Reference in New Issue
Block a user