qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 04/11] qdev: add reference count to a device for


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 04/11] qdev: add reference count to a device for the BusChild
Date: Wed, 09 Jan 2013 14:23:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Il 07/01/2013 21:26, Anthony Liguori ha scritto:
>> > +    object_ref(OBJECT(kid->child));
>> >  
>> >      QTAILQ_INSERT_HEAD(&bus->children, kid, sibling);
>> >  
>> > +    /* This transfers ownership of kid->child to the property.  */
>> >      snprintf(name, sizeof(name), "child[%d]", kid->index);
>> >      object_property_add_link(OBJECT(bus), name,
>> >                               object_get_typename(OBJECT(child)),
> 
> The link property itself holds a reference no?  Or is this not the case
> because we aren't checking a link when it's added and taking a reference
> if it's !NULL?

Yes.  I think it's okay this way though, and anyway a separate series
that would touch all object_property_add_link callers.

Paolo



reply via email to

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