qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: pannengyuan@huawei.com, peter.maydell@linaro.org,
	andrew@aj.id.au, joel@jms.id.au
Cc: qemu-arm@nongnu.org, kenny.zhangjun@huawei.com,
	qemu-devel@nongnu.org, zhang.zhanghailiang@huawei.com
Subject: Re: [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init()
Date: Mon, 18 Nov 2019 09:01:44 +0100	[thread overview]
Message-ID: <6cfb4721-d2f7-6876-83a8-2e4bf82b8c84@kaod.org> (raw)
In-Reply-To: <1574041065-34936-1-git-send-email-pannengyuan@huawei.com>

On 18/11/2019 02:37, pannengyuan@huawei.com wrote:
> From: PanNengyuan <pannengyuan@huawei.com>
> 
> Address Sanitizer shows memory leak in hw/gpio/aspeed_gpio.c:875
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: PanNengyuan <pannengyuan@huawei.com>

Reviewed-by: Cédric Le Goater <clg@kaod.org> 

I will add this patch the series I am building for 5.0.

Thanks,

C.

> ---
>  hw/gpio/aspeed_gpio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c
> index 7acc5fa..41e11ea 100644
> --- a/hw/gpio/aspeed_gpio.c
> +++ b/hw/gpio/aspeed_gpio.c
> @@ -876,6 +876,7 @@ static void aspeed_gpio_init(Object *obj)
>                                 pin_idx % GPIOS_PER_GROUP);
>          object_property_add(obj, name, "bool", aspeed_gpio_get_pin,
>                              aspeed_gpio_set_pin, NULL, NULL, NULL);
> +        g_free(name);
>      }
>  }
>  
> 



      reply	other threads:[~2019-11-18  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18  1:37 [QEMU-DEVEL][PATCH] gpio: fix memory leak in aspeed_gpio_init() pannengyuan
2019-11-18  8:01 ` Cédric Le Goater [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=6cfb4721-d2f7-6876-83a8-2e4bf82b8c84@kaod.org \
    --to=clg@kaod.org \
    --cc=andrew@aj.id.au \
    --cc=joel@jms.id.au \
    --cc=kenny.zhangjun@huawei.com \
    --cc=pannengyuan@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --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).