qmp: fix object-add assert() without props
Since commit ad739706, user_creatable_add_type() expects to be given a qdict. However, if object-add is called without props, you reach the assert: "qemu/qom/object_interfaces.c:115: user_creatable_add_type: Assertion `qdict' failed.", because the qdict isn't created in this case (it's optional). Furthermore, qmp_input_visitor_new() is not meant to be called without a dict, and a further commit will assert in this situation. If none given, create an empty qdict in qmp to avoid the user_creatable_add_type() assert(qdict). Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-Id: <20160922203927.28241-2-marcandre.lureau@redhat.com> Tested-by: NXiao Long Jiang <zxiaol@linux.vnet.ibm.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> (cherry picked from commit e64c75a9) Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录