From: Laurent Vivier <laurent@vivier.eu>
To: Pan Nengyuan <pannengyuan@huawei.com>, qemu-devel@nongnu.org
Cc: berrange@redhat.com, zhang.zhanghailiang@huawei.com,
qemu-trivial@nongnu.org, euler.robot@huawei.com,
pbonzini@redhat.com, ehabkost@redhat.com
Subject: Re: [PATCH] core/qdev: fix memleak in qdev_get_gpio_out_connector()
Date: Mon, 9 Mar 2020 13:05:51 +0100 [thread overview]
Message-ID: <065a73ce-c0ee-07be-b442-c98763f99e1c@vivier.eu> (raw)
In-Reply-To: <20200307030756.5913-1-pannengyuan@huawei.com>
Le 07/03/2020 à 04:07, Pan Nengyuan a écrit :
> 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>
> ---
> hw/core/qdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index 3937d1eb1a..85f062def7 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -557,7 +557,7 @@ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n,
>
> qemu_irq qdev_get_gpio_out_connector(DeviceState *dev, const char *name, int n)
> {
> - char *propname = g_strdup_printf("%s[%d]",
> + g_autofree char *propname = g_strdup_printf("%s[%d]",
> name ? name : "unnamed-gpio-out", n);
>
> qemu_irq ret = (qemu_irq)object_property_get_link(OBJECT(dev), propname,
>
Applied to my trivial-patches branch.
Thanks,
Laurent
prev parent reply other threads:[~2020-03-09 12:06 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
2020-03-09 10:48 ` Daniel P. Berrangé
2020-03-09 12:05 ` Laurent Vivier [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=065a73ce-c0ee-07be-b442-c98763f99e1c@vivier.eu \
--to=laurent@vivier.eu \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=euler.robot@huawei.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).