On 05/28/2014 04:19 PM, Max Reitz wrote: > If bs->drv is NULL, iov.iov_base should not be leaked. > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block/qcow2-cluster.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> > > diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c > index 33e6826..d391c5a 100644 > --- a/block/qcow2-cluster.c > +++ b/block/qcow2-cluster.c > @@ -387,7 +387,8 @@ static int coroutine_fn copy_sectors(BlockDriverState *bs, > BLKDBG_EVENT(bs->file, BLKDBG_COW_READ); > > if (!bs->drv) { > - return -ENOMEDIUM; > + ret = -ENOMEDIUM; > + goto out; > } > > /* Call .bdrv_co_readv() directly instead of using the public block-layer > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature