summaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-01-13 15:46:39 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-01-29 10:01:45 +0100
commit206addd58f251666f5b64d43957ddcba465c0ef1 (patch)
tree2d051d2b6644616499d277e63751868959301436 /hmp.c
parentcfa9bb236911eaa30ac58072105881a65cbbb612 (diff)
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>
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index 481be8019b..a42c5c07be 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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)
{