From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Andreas Faerber <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on failure
Date: Tue, 04 Mar 2014 08:18:28 -0700 [thread overview]
Message-ID: <5315EEC4.1010209@redhat.com> (raw)
In-Reply-To: <1393943298-5938-1-git-send-email-stefanha@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
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 <stefanha@redhat.com>
> ---
> qom/object.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-03-04 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 14:28 [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on failure Stefan Hajnoczi
2014-03-04 15:18 ` Eric Blake [this message]
2014-03-04 16:11 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5315EEC4.1010209@redhat.com \
--to=eblake@redhat.com \
--cc=afaerber@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.