mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-27 06:35:23 -07:00
ppc/spapr_events: fix potential NULL pointer dereference in rtas_event_log_dequeue
This fixes coverity issues 68911917:
360
CID 68911917: (NULL_RETURNS)
361. dereference: Dereferencing "source", which is known to be
"NULL".
361 if (source->mask & event_mask) {
362 break;
363 }
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: PanNengyuan <pannengyuan@huawei.com>
Message-Id: <1574685291-38176-1-git-send-email-pannengyuan@huawei.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
6cf80f90c4
commit
59d0533b85
1 changed files with 1 additions and 0 deletions
|
|
@ -358,6 +358,7 @@ static SpaprEventLogEntry *rtas_event_log_dequeue(SpaprMachineState *spapr,
|
|||
rtas_event_log_to_source(spapr,
|
||||
spapr_event_log_entry_type(entry));
|
||||
|
||||
g_assert(source);
|
||||
if (source->mask & event_mask) {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue