qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Pan Nengyuan" <pannengyuan@huawei.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	qemu trival <qemu-trivial@nongnu.org>,
	QEMU <qemu-devel@nongnu.org>,
	Euler Robot <euler.robot@huawei.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	zhanghailiang <zhang.zhanghailiang@huawei.com>
Subject: Re: [PATCH] core/qdev: fix memleak in qdev_get_gpio_out_connector()
Date: Mon, 9 Mar 2020 11:49:44 +0100	[thread overview]
Message-ID: <ad16dac4-8534-7b19-fe16-0e799e615005@vivier.eu> (raw)
In-Reply-To: <a69e324c-21c4-dcfd-516d-0515f86a2f28@huawei.com>

Le 09/03/2020 à 11:41, Pan Nengyuan a écrit :
> 
> 
> On 3/9/2020 5:16 PM, Laurent Vivier wrote:
>> Le 07/03/2020 à 11:39, Marc-André Lureau a écrit :
>>> Hi
>>>
>>> On Sat, Mar 7, 2020 at 3:53 AM Pan Nengyuan <pannengyuan@huawei.com> wrote:
>>>>
>>>> Fix a memory leak in qdev_get_gpio_out_connector().
>>>>
>>>> Reported-by: Euler Robot <euler.robot@huawei.com>
>>>> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
>>>
>>> good catch,
>>> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> trivial question:
>>
>> Why do we prefer g_autofree() to the g_free() function?
> 
> Honestly, it's no special reason in this case, just personal preference. :)
> Both of them is ok.

I asked because the function above uses a g_free() for the same purpose.

Thanks,
Laurent


  reply	other threads:[~2020-03-09 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07  3:07 [PATCH] core/qdev: fix memleak in qdev_get_gpio_out_connector() Pan Nengyuan
2020-03-07  3:16 ` no-reply
2020-03-07 10:39 ` Marc-André Lureau
2020-03-09  9:16   ` Laurent Vivier
2020-03-09 10:41     ` Pan Nengyuan
2020-03-09 10:49       ` Laurent Vivier [this message]
2020-03-09 10:48     ` Daniel P. Berrangé
2020-03-09 12:05 ` Laurent Vivier

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=ad16dac4-8534-7b19-fe16-0e799e615005@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=euler.robot@huawei.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pannengyuan@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).