Skip to content

Commit

Permalink
Fix nasa#565, propagate return code from OS_TaskRegister_Impl()
Browse files Browse the repository at this point in the history
If this routine fails then return the error to the caller,
which will also prevent the task from starting.
  • Loading branch information
jphickey committed Aug 18, 2020
1 parent 8cfd6fe commit 1bf0574
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/os/shared/src/osapi-task.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ static int32 OS_TaskPrepare(uint32 task_id, osal_task_entry *entrypt)

if (return_code == OS_SUCCESS)
{
OS_TaskRegister_Impl(task_id);
return_code = OS_TaskRegister_Impl(task_id);
}
else

if (return_code != OS_SUCCESS)
{
*entrypt = NULL;
}
Expand Down

0 comments on commit 1bf0574

Please sign in to comment.