diff options
author | Anthony Liguori | 2011-08-21 05:09:37 +0200 |
---|---|---|
committer | Anthony Liguori | 2011-08-21 06:01:08 +0200 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/lsi53c895a.c | |
parent | Make glib mandatory and fixup utils appropriately (diff) | |
download | qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.xz qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip |
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/lsi53c895a.c')
-rw-r--r-- | hw/lsi53c895a.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 41c2fb0b70..1643a63ee8 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -353,10 +353,10 @@ static void lsi_soft_reset(LSIState *s) while (!QTAILQ_EMPTY(&s->queue)) { p = QTAILQ_FIRST(&s->queue); QTAILQ_REMOVE(&s->queue, p, next); - qemu_free(p); + g_free(p); } if (s->current) { - qemu_free(s->current); + g_free(s->current); s->current = NULL; } } @@ -664,7 +664,7 @@ static void lsi_request_cancelled(SCSIRequest *req) if (s->current && req == s->current->req) { scsi_req_unref(req); - qemu_free(s->current); + g_free(s->current); s->current = NULL; return; } @@ -672,7 +672,7 @@ static void lsi_request_cancelled(SCSIRequest *req) if (p) { QTAILQ_REMOVE(&s->queue, p, next); scsi_req_unref(req); - qemu_free(p); + g_free(p); } } @@ -723,7 +723,7 @@ static void lsi_command_complete(SCSIRequest *req, uint32_t status) if (s->current && req == s->current->req) { scsi_req_unref(s->current->req); - qemu_free(s->current); + g_free(s->current); s->current = NULL; } lsi_resume_script(s); @@ -779,7 +779,7 @@ static void lsi_do_command(LSIState *s) } assert(s->current == NULL); - s->current = qemu_mallocz(sizeof(lsi_request)); + s->current = g_malloc0(sizeof(lsi_request)); s->current->tag = s->select_tag; s->current->req = scsi_req_new(dev, s->current->tag, s->current_lun, buf, s->current); |