possible NULL pointer dereference
it appears some of the MsgTask msgs might fail to create, ending up with a NULL pointer, in which case when it gets received, dereferencing a NULL pointer will happen, causing crash. Change-Id: I5a4295b4fba9c8383754e2abe6558782b1b83143 CRs-Fixed: 1106034
This commit is contained in:
parent
681388fa8d
commit
5253a74c6b
1 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,11 @@ void MsgTask::destroy() {
|
|||
}
|
||||
|
||||
void MsgTask::sendMsg(const LocMsg* msg) const {
|
||||
msg_q_snd((void*)mQ, (void*)msg, LocMsgDestroy);
|
||||
if (msg) {
|
||||
msg_q_snd((void*)mQ, (void*)msg, LocMsgDestroy);
|
||||
} else {
|
||||
LOC_LOGE("%s: msg is NULL", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
void MsgTask::prerun() {
|
||||
|
|
Loading…
Reference in a new issue