Skip to content

Commit

Permalink
scsi-disk: qemu_vfree(NULL) is fine, simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
Markus Armbruster authored and stefanhaRH committed Jan 15, 2013
1 parent 94c8ff3 commit db4c34c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hw/scsi-disk.c
Expand Up @@ -85,9 +85,7 @@ static void scsi_free_request(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);

if (r->iov.iov_base) {
qemu_vfree(r->iov.iov_base);
}
qemu_vfree(r->iov.iov_base);
}

/* Helper function for command completion with sense. */
Expand Down

0 comments on commit db4c34c

Please sign in to comment.