diff options
author | Thomas Huth | 2017-01-25 21:45:17 +0100 |
---|---|---|
committer | Michael Tokarev | 2017-05-10 09:19:23 +0200 |
commit | 6516367fc0803d079384e0ad370856ac328bef30 (patch) | |
tree | 5718b122f6af197ce4500ab179bd9d59ff8998da /scripts/switch-timer-api | |
parent | virtio-blk: Remove useless condition around g_free() (diff) | |
download | qemu-6516367fc0803d079384e0ad370856ac328bef30.tar.gz qemu-6516367fc0803d079384e0ad370856ac328bef30.tar.xz qemu-6516367fc0803d079384e0ad370856ac328bef30.zip |
hw/core/generic-loader: Fix crash when running without CPU
When running QEMU with "-M none -device loader,file=kernel.elf", it
currently crashes with a segmentation fault, because the "none"-machine
does not have any CPU by default and the generic loader code tries
to dereference s->cpu. Fix it by adding an appropriate check for a
NULL pointer.
Reported-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'scripts/switch-timer-api')
0 files changed, 0 insertions, 0 deletions