[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH 2/6] sheepdog: fix possible resouce leak and o
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-trivial] [PATCH 2/6] sheepdog: fix possible resouce leak and out-of-bounds access |
Date: |
Thu, 3 Mar 2016 13:12:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
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
[Qemu-trivial] [PATCH 4/6] hostmem-file: fix memory leak, Gonglei, 2016/03/03
[Qemu-trivial] [PATCH 3/6] spice: fix coverity complains, Gonglei, 2016/03/03
[Qemu-trivial] [PATCH 5/6] spapr: fix possible Negative array index read, Gonglei, 2016/03/03
[Qemu-trivial] [PATCH 6/6] smbus: fix memory leak, Gonglei, 2016/03/03