[Qemu-devel] Re: [PATCH] scsi: Implement alloc_req_iov callback

2010-11-23 Thread Paolo Bonzini
On 11/23/2010 09:12 AM, Hannes Reinecke wrote: qemu-malloc.c has: void qemu_free(void *ptr) { trace_qemu_free(ptr); free(ptr); } and 'free' doesn't normally do an error checking on the argument. Am I missing something? It's not error checking: from free(3), free() frees the memory

Re: [Qemu-devel] Re: [PATCH] scsi: Implement alloc_req_iov callback

2010-11-23 Thread Hannes Reinecke
On 11/22/2010 10:48 PM, Stefan Hajnoczi wrote: > On Mon, Nov 22, 2010 at 10:15 AM, Hannes Reinecke wrote: > Looks good. If you send out another version of the patchset you might > like to fix this nitpick: > >> +if (!r->io_header.iovec_count) { >> +if (r->buflen != r->req.cmd.xfer) {

[Qemu-devel] Re: [PATCH] scsi: Implement alloc_req_iov callback

2010-11-22 Thread Stefan Hajnoczi
On Mon, Nov 22, 2010 at 10:15 AM, Hannes Reinecke wrote: Looks good. If you send out another version of the patchset you might like to fix this nitpick: > +    if (!r->io_header.iovec_count) { > +        if (r->buflen != r->req.cmd.xfer) { > +            if (r->buf != NULL) > +                qe