summaryrefslogtreecommitdiff
path: root/hw/virtio-blk.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/virtio-blk.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/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 836dbc3c12..dad8c0a6a2 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -59,7 +59,7 @@ static void virtio_blk_req_complete(VirtIOBlockReq *req, int status)
virtqueue_push(s->vq, &req->elem, req->qiov.size + sizeof(*req->in));
virtio_notify(&s->vdev, s->vq);
- qemu_free(req);
+ g_free(req);
}
static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
@@ -117,7 +117,7 @@ static void virtio_blk_flush_complete(void *opaque, int ret)
static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s)
{
- VirtIOBlockReq *req = qemu_malloc(sizeof(*req));
+ VirtIOBlockReq *req = g_malloc(sizeof(*req));
req->dev = s;
req->qiov.size = 0;
req->next = NULL;
@@ -130,7 +130,7 @@ static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
if (req != NULL) {
if (!virtqueue_pop(s->vq, &req->elem)) {
- qemu_free(req);
+ g_free(req);
return NULL;
}
}