9pfs: fix crash when fsdev is missing
commitf2b58c43758efc61e2a49b899f5e58848489d0dc
authorGreg Kurz <groug@kaod.org>
Tue, 3 Jan 2017 16:28:44 +0000 (3 17:28 +0100)
committerGreg Kurz <groug@kaod.org>
Tue, 3 Jan 2017 16:28:44 +0000 (3 17:28 +0100)
tree698bd14d31b003dae32a730bf6ac6db0750b2a52
parent88da0b03019ecadc3faaddf81a97c7ac83448280
9pfs: fix crash when fsdev is missing

If the user passes -device virtio-9p without the corresponding -fsdev, QEMU
dereferences a NULL pointer and crashes.

This is a 2.8 regression introduced by commit 702dbcc274e2c.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
hw/9pfs/9p.c