qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	berrange@redhat.com, ehabkost@redhat.com,
	Pan Nengyuan <pannengyuan@huawei.com>,
	qemu-devel@nongnu.org, euler.robot@huawei.com,
	zhang.zhanghailiang@huawei.com
Subject: Re: [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to fix memleak
Date: Mon, 6 Apr 2020 11:46:38 +0200	[thread overview]
Message-ID: <3fe7d100-9e13-3d3e-c40a-1c19502fb0b4@redhat.com> (raw)
In-Reply-To: <87k12t9l7e.fsf@dusky.pond.sub.org>

On 06/04/20 08:34, Markus Armbruster wrote:
> Paolo, looks like this has fallen through the cracks.  If you'd prefer
> me to take it, let me know.
> 
> Markus Armbruster <armbru@redhat.com> writes:

Actually it was in my latest pull request, but between this version, 
Marc-André and mine you might have missed it:

commit 7f5d9b206d1e86425faa5b84b551068bf044b823
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Thu Mar 26 10:41:21 2020 +0100

    object-add: don't create return value if failed
    
    No need to return an empty value from object-add (it would also leak
    if the command failed).  While at it, remove the "if" around object_unref
    since object_unref handles NULL arguments just fine.
    
    Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
    Message-Id: <20200325184723.2029630-4-marcandre.lureau@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Thanks,

Paolo



      reply	other threads:[~2020-04-06 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13  7:58 [PATCH] qom-qmp-cmds: remove unnecessary alloc in qmp_object_add to fix memleak Pan Nengyuan
2020-03-17 10:49 ` Markus Armbruster
2020-04-06  6:34   ` Markus Armbruster
2020-04-06  9:46     ` Paolo Bonzini [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=3fe7d100-9e13-3d3e-c40a-1c19502fb0b4@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=euler.robot@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=pannengyuan@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.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).