qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hao Wu <wuhaotsh@google.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	 QEMU Developers <qemu-devel@nongnu.org>,
	Tyrone Ting <kfting@nuvoton.com>,
	 Havard Skinnemoen <hskinnemoen@google.com>
Subject: Re: [PATCH] hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init()
Date: Tue, 8 Mar 2022 10:53:02 -0800	[thread overview]
Message-ID: <CAGcCb11FYaAEXDUc==FLYbVhL3eZgCTn_dwhd46SxjobGnF3Qg@mail.gmail.com> (raw)
In-Reply-To: <1293fd43-c952-8c23-a903-485a15ec6366@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

On Tue, Mar 8, 2022 at 10:09 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 3/8/22 07:03, Peter Maydell wrote:
> > In npcm7xx_clk_sel_init() we allocate a string with g_strdup_printf().
> > Use g_autofree so we free it rather than leaking it.
> >
> > (Detected with the clang leak sanitizer.)
> >
> > Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> > ---
> >   hw/misc/npcm7xx_clk.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> Reviewed-by: Hao Wu <wuhaotsh@google.com>

> r~
>
>

[-- Attachment #2: Type: text/html, Size: 1319 bytes --]

  reply	other threads:[~2022-03-08 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 17:03 [PATCH] hw/misc/npcm7xx_clk: Don't leak string in npcm7xx_clk_sel_init() Peter Maydell
2022-03-08 17:21 ` Richard Henderson
2022-03-08 18:53   ` Hao Wu [this message]
2022-03-08 17:28 ` Philippe Mathieu-Daudé

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='CAGcCb11FYaAEXDUc==FLYbVhL3eZgCTn_dwhd46SxjobGnF3Qg@mail.gmail.com' \
    --to=wuhaotsh@google.com \
    --cc=hskinnemoen@google.com \
    --cc=kfting@nuvoton.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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).