qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, shannon.zhao@linaro.org
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/4] hw/display/cg3.c: Fix memory leak
Date: Thu, 28 May 2015 20:08:01 +0800	[thread overview]
Message-ID: <55670521.6090001@huawei.com> (raw)
In-Reply-To: <55670247.5040100@msgid.tls.msk.ru>



On 2015/5/28 19:55, Michael Tokarev wrote:
> 28.05.2015 14:13, Shannon Zhao wrote:
>> > From: Shannon Zhao <shannon.zhao@linaro.org>
>> > 
>> > Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
>> > Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> > ---
>> >  hw/display/cg3.c | 1 +
>> >  1 file changed, 1 insertion(+)
>> > 
>> > diff --git a/hw/display/cg3.c b/hw/display/cg3.c
>> > index 1e6ff2b..b86e5c0 100644
>> > --- a/hw/display/cg3.c
>> > +++ b/hw/display/cg3.c
>> > @@ -302,6 +302,7 @@ static void cg3_realizefn(DeviceState *dev, Error **errp)
>> >      if (fcode_filename) {
>> >          ret = load_image_targphys(fcode_filename, s->prom_addr,
>> >                                    FCODE_MAX_ROM_SIZE);
>> > +        g_free(fcode_filename);
>> >          if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
>> >              error_report("cg3: could not load prom '%s'", CG3_ROM_FILE);
>> >          }
> BTW, here, maybe it is better to rework error message too,
> to include the actual filename it tried to load, not the
> base name of it.
> 

So respin this and other patches?

> Is the error fatal?

If CG3_ROM_FILE is removed, it happens.

-- 
Shannon

  reply	other threads:[~2015-05-28 12:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 11:13 [Qemu-devel] [PATCH 0/4] Fix memory leak due to calling qemu_find_file and not freeing return buf Shannon Zhao
2015-05-28 11:13 ` [Qemu-devel] [PATCH 1/4] hw/display/cg3.c: Fix memory leak Shannon Zhao
2015-05-28 11:55   ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2015-05-28 12:08     ` Shannon Zhao [this message]
2015-05-28 11:13 ` [Qemu-devel] [PATCH 2/4] hw/alpha/dp264.c: Fix memory leak spotted by valgrind Shannon Zhao
2015-05-28 11:50   ` Michael Tokarev
2015-05-28 11:58     ` Shannon Zhao
2015-05-28 11:13 ` [Qemu-devel] [PATCH 3/4] hw/ppc/e500.c: Fix memory leak Shannon Zhao
2015-05-28 11:57   ` Michael Tokarev
2015-05-28 11:13 ` [Qemu-devel] [PATCH 4/4] hw/display/tcx.c: Fix memory leak spotted by valgrind Shannon Zhao
2015-05-28 11:54   ` Michael Tokarev
2015-05-28 12:01     ` Michael Tokarev
2015-05-28 12:19       ` Mark Cave-Ayland
2015-05-29  6:18         ` Michael Tokarev

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=55670521.6090001@huawei.com \
    --to=zhaoshenglong@huawei.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=shannon.zhao@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).