aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-01-15 14:23:38 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-15 16:47:28 +0100
commitdb4c34c3df5107ec4900ff07f70c540479a7eeca (patch)
tree826138b25efc8a3850bab66b85e638a6caa7db58 /hw
parent94c8ff3a01d9bd1005f066a0ee3fe43c842a43b7 (diff)
downloadqemu-db4c34c3df5107ec4900ff07f70c540479a7eeca.zip
qemu-db4c34c3df5107ec4900ff07f70c540479a7eeca.tar.gz
qemu-db4c34c3df5107ec4900ff07f70c540479a7eeca.tar.bz2
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi-disk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index f8d7ef3..96db9a7 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -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. */