qemu-devel
[Top][All Lists]
Advanced

[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: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on failure
Date: Tue, 04 Mar 2014 17:11:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 04.03.2014 15:28, schrieb Stefan Hajnoczi:
> 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(-)

Nice catch!

Thanks, applied to qom-next (and suggesting for qemu-stable):
https://github.com/afaerber/qemu-cpu/commits/qom-next

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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