qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qom: avoid leaking str and bool properties on failure
Date: Tue, 04 Mar 2014 17:11:02 +0100	[thread overview]
Message-ID: <5315FB16.3010905@suse.de> (raw)
In-Reply-To: <1393943298-5938-1-git-send-email-stefanha@redhat.com>

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 <stefanha@redhat.com>
> ---
>  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

      parent reply	other threads:[~2014-03-04 16:11 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
2014-03-04 16:11 ` Andreas Färber [this message]

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=5315FB16.3010905@suse.de \
    --to=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).