diff options
author | PanNengyuan <pannengyuan@huawei.com> | 2019-11-25 20:34:51 +0800 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-11-26 10:12:58 +1100 |
commit | 59d0533b85158fdbe43bad696d4f50ec29a04c32 (patch) | |
tree | 048fa159172bd2be7eb5c6630a72acc3676a2538 | |
parent | 6cf80f90c441e86f2e92c8a07d6b29ca3f1d43e8 (diff) | |
download | qemu-59d0533b85158fdbe43bad696d4f50ec29a04c32.zip qemu-59d0533b85158fdbe43bad696d4f50ec29a04c32.tar.gz qemu-59d0533b85158fdbe43bad696d4f50ec29a04c32.tar.bz2 |
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>
-rw-r--r-- | hw/ppc/spapr_events.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c index 0e4c195..e355e00 100644 --- a/hw/ppc/spapr_events.c +++ b/hw/ppc/spapr_events.c @@ -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; } |