vl.c: Exit QEMU early if no machine is found
We check whether the variable machine is NULL or not before accessing it. If machine is NULL, exit QEMU with an error, this can avoids a segfault error. Markus Armbruster <armbru@redhat.com> adds that the segfault can be reproduced as follows: $ qemu-system-xtensa -cpu help Signed-off-by: NDunrong Huang <riegamaths@gmail.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录