scsi-disk: qemu_vfree(NULL) is fine, simplify

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>
This commit is contained in:
Markus Armbruster 2013-01-15 14:23:38 +01:00 committed by Stefan Hajnoczi
parent 94c8ff3a01
commit db4c34c3df

View File

@ -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. */