fix: dereference NULL point bug fix

Change-Id: Ib068696c9280105e209469e875c187d741b704d2
This commit is contained in:
Guangyao Ma 2021-04-25 11:47:05 +08:00 committed by YOUR_NAME
parent be40fa1381
commit deaa564a66
1 changed files with 5 additions and 1 deletions

View File

@ -270,8 +270,12 @@ int OsSigProcessSend(LosProcessCB *spcb, siginfo_t *sigInfo)
.receivedTcb = NULL
};
if (info.sigInfo == NULL){
return -EFAULT;
}
/* visit all taskcb and dispatch signal */
if ((info.sigInfo != NULL) && (info.sigInfo->si_signo == SIGKILL)) {
if (info.sigInfo->si_signo == SIGKILL) {
(void)OsSigProcessForeachChild(spcb, SigProcessKillSigHandler, &info);
OsSigAddSet(&spcb->sigShare, info.sigInfo->si_signo);
OsWaitSignalToWakeProcess(spcb);