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/lsi53c895a.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (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/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); |