mirror of https://github.com/xqemu/xqemu.git
hmp: Compile hmp_info_spice() only with CONFIG_SPICE
It's dead code when CONFIG_SPICE is off. If it wasn't, it would crash dereferencing the null pointer returned by the qmp_query_spice() dummy in qmp.c. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
cfa9bb2369
commit
206addd58f
2
hmp.c
2
hmp.c
|
@ -535,6 +535,7 @@ out:
|
||||||
qapi_free_VncInfo(info);
|
qapi_free_VncInfo(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_SPICE
|
||||||
void hmp_info_spice(Monitor *mon, const QDict *qdict)
|
void hmp_info_spice(Monitor *mon, const QDict *qdict)
|
||||||
{
|
{
|
||||||
SpiceChannelList *chan;
|
SpiceChannelList *chan;
|
||||||
|
@ -581,6 +582,7 @@ void hmp_info_spice(Monitor *mon, const QDict *qdict)
|
||||||
out:
|
out:
|
||||||
qapi_free_SpiceInfo(info);
|
qapi_free_SpiceInfo(info);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void hmp_info_balloon(Monitor *mon, const QDict *qdict)
|
void hmp_info_balloon(Monitor *mon, const QDict *qdict)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue