qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH-for-5.2] hw/rx/rx-gdbsim: Fix memory leak
Date: Thu, 29 Oct 2020 12:57:11 -0700	[thread overview]
Message-ID: <cf44f3b3-c604-0b02-f37a-271f238956fa@linaro.org> (raw)
In-Reply-To: <20201028192219.833329-1-f4bug@amsat.org>

On 10/28/20 12:22 PM, Philippe Mathieu-Daudé wrote:
> +            g_autofree void *dtb;
>  
>              dtb = load_device_tree(dtb_filename, &dtb_size);

With g_autofree, we must initialize the variable on declaration.  Often this is
with NULL, but in this case, just merge these two lines.

With that,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


  reply	other threads:[~2020-10-29 19:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 19:22 [PATCH-for-5.2] hw/rx/rx-gdbsim: Fix memory leak Philippe Mathieu-Daudé
2020-10-29 19:57 ` Richard Henderson [this message]
2020-10-30  7:21   ` 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=cf44f3b3-c604-0b02-f37a-271f238956fa@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=ysato@users.sourceforge.jp \
    /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).