diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/scsi-generic.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) | |
download | qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.bz2 |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c index b63371e..cb5d4f1 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; } |