[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on f
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on failure |
Date: |
Tue, 04 Mar 2014 08:18:28 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 03/04/2014 07:28 AM, Stefan Hajnoczi wrote:
> When object_property_add_str() and object_property_add_bool() fail, they
> leak their internal StringProperty and BoolProperty structs. Remember
> to free the structs on error.
>
> Luckily this is a low-impact memory leak since most QOM properties are
> static qdev properties that will never take the error case.
> object_property_add() only fails if the property name is already in use.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
> qom/object.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature