From: Paolo Bonzini <pbonzini@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access
Date: Thu, 3 Mar 2016 13:12:28 +0100 [thread overview]
Message-ID: <56D82A2C.6000607@redhat.com> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020B02EC39F@SZXEMA503-MBS.china.huawei.com>
On 03/03/2016 13:00, Gonglei (Arei) wrote:
>>> > >
>>> > > - ret = find_vdi_name(s, s->name, snap_id, snap_tag, &vid, true,
>>> > > + ret = find_vdi_name(s, s->name, hdr.snapid, snap_tag, &vid, true,
>>> > > &local_err);
>>> > > if (ret) {
>>> > > + error_report_err(local_err);
>>> > > return ret;
>>> > > }
>>> > >
>>> > >
>> >
>> > A patch for this has been posted yesterday by Jeff Cody.
>> >
> OK, I found it. And Max's comments is right, Jef can use hdr.snapid instead of snap_tag
> to invoke find_vdi_name().
>
> But, except that fix, My patch also fixed a memory leak, did you see that?
No, I didn't notice -- it's not clear that error_report_err also frees
the error.
> Do I need post an separate patch to fix memory leak?
Yes, but the right fix in my opinion is to pass errp to find_vdi_name
instead.
Paolo
next prev parent reply other threads:[~2016-03-03 12:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-03 9:43 [Qemu-devel] [PATCH 0/6] fix some coverity complains Gonglei
2016-03-03 9:43 ` [Qemu-devel] [PATCH 1/6] egl-helpers: fix possible resource leak Gonglei
2016-03-03 11:19 ` Paolo Bonzini
2016-05-10 6:02 ` Gonglei (Arei)
2016-03-03 9:43 ` [Qemu-devel] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access Gonglei
2016-03-03 11:17 ` Paolo Bonzini
2016-03-03 12:00 ` Gonglei (Arei)
2016-03-03 12:12 ` Paolo Bonzini [this message]
2016-03-03 12:35 ` Gonglei (Arei)
2016-03-03 9:43 ` [Qemu-devel] [PATCH 3/6] spice: fix coverity complains Gonglei
2016-03-03 11:19 ` Paolo Bonzini
2016-05-10 5:59 ` Gonglei (Arei)
2016-03-03 9:43 ` [Qemu-devel] [PATCH 4/6] hostmem-file: fix memory leak Gonglei
2016-03-03 11:19 ` Paolo Bonzini
2016-03-03 9:43 ` [Qemu-devel] [PATCH 5/6] spapr: fix possible Negative array index read Gonglei
2016-03-03 11:19 ` Paolo Bonzini
2016-03-03 9:43 ` [Qemu-devel] [PATCH 6/6] smbus: fix memory leak Gonglei
2016-03-03 11:19 ` Paolo Bonzini
2016-03-03 12:05 ` Gonglei (Arei)
2016-04-06 2:12 ` [Qemu-devel] [PATCH 0/6] fix some coverity complains Gonglei (Arei)
2016-04-06 6:30 ` Paolo Bonzini
2016-04-06 6:31 ` Paolo Bonzini
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=56D82A2C.6000607@redhat.com \
--to=pbonzini@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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).