[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [blktap2] fix two 'maybe uninitialized' variables
On Thu, 2014-06-12 at 13:40 +0200, Dario Faggioli wrote: > So, I'd have to ask to someone who's more into that code to advise, I'm > afraid. :-/ There is no such person I'm afraid and hasn't been for some years. In the absence of a blktap2 maintainer and/or the absence of any voices to the contrary I'm inclined to take this, it seems to return the same error code as other failures in this function. Please resubmit without the spacespace damage and with a commit log and S-o-b. > > Thanks and Regards, > Dario > > --- > diff --git a/tools/blktap2/drivers/block-qcow.c > b/tools/blktap2/drivers/block-qcow.c > index d5053d4..b45bcaa 100644 > --- a/tools/blktap2/drivers/block-qcow.c > +++ b/tools/blktap2/drivers/block-qcow.c > @@ -427,6 +427,7 @@ static uint64_t get_cluster_offset(struct tdqcow_state *s, > > if (posix_memalign((void **)&tmp_ptr, 4096, 4096) != 0) { > DPRINTF("ERROR allocating memory for L1 table\n"); > + return 0; > } > memcpy(tmp_ptr, l1_ptr, 4096); > > @@ -600,6 +601,7 @@ found: > > if (posix_memalign((void **)&tmp_ptr2, 4096, 4096) != 0) { > DPRINTF("ERROR allocating memory for L1 table\n"); > + return 0; > } > memcpy(tmp_ptr2, l2_ptr, 4096); > lseek(s->fd, l2_offset + (l2_sector << 12), SEEK_SET); > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |