summaryrefslogtreecommitdiff
path: root/hw/scsi-generic.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/scsi-generic.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r--hw/scsi-generic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index b63371e65..cb5d4f125 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -66,7 +66,7 @@ static void scsi_free_request(SCSIRequest *req)
{
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);
- qemu_free(r->buf);
+ g_free(r->buf);
}
/* Helper function for command completion. */
@@ -288,7 +288,7 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
if (r->req.cmd.xfer == 0) {
if (r->buf != NULL)
- qemu_free(r->buf);
+ g_free(r->buf);
r->buflen = 0;
r->buf = NULL;
ret = execute_command(s->bs, r, SG_DXFER_NONE, scsi_command_complete);
@@ -301,8 +301,8 @@ static int32_t scsi_send_command(SCSIRequest *req, uint8_t *cmd)
if (r->buflen != r->req.cmd.xfer) {
if (r->buf != NULL)
- qemu_free(r->buf);
- r->buf = qemu_malloc(r->req.cmd.xfer);
+ g_free(r->buf);
+ r->buf = g_malloc(r->req.cmd.xfer);
r->buflen = r->req.cmd.xfer;
}