Commit 206addd5 authored by Markus Armbruster's avatar Markus Armbruster
Browse files

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: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent cfa9bb23
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -535,6 +535,7 @@ out:
    qapi_free_VncInfo(info);
}

#ifdef CONFIG_SPICE
void hmp_info_spice(Monitor *mon, const QDict *qdict)
{
    SpiceChannelList *chan;
@@ -581,6 +582,7 @@ void hmp_info_spice(Monitor *mon, const QDict *qdict)
out:
    qapi_free_SpiceInfo(info);
}
#endif

void hmp_info_balloon(Monitor *mon, const QDict *qdict)
{