qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/3] qmp: fix object-add assert() without pro


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 1/3] qmp: fix object-add assert() without props
Date: Thu, 22 Sep 2016 08:57:57 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 09/22/2016 08:09 AM, Marc-André Lureau wrote:
> Since commit ad739706bbadee49, 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: Marc-André Lureau <address@hidden>
> ---
>  qmp.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 

Looks nicer than v1. Thanks.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]