提交 206addd5 编写于 作者: M Markus Armbruster

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: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
上级 cfa9bb23
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册