Revision 7267c094 hw/virtio-blk.c
b/hw/virtio-blk.c | ||
---|---|---|
59 | 59 |
virtqueue_push(s->vq, &req->elem, req->qiov.size + sizeof(*req->in)); |
60 | 60 |
virtio_notify(&s->vdev, s->vq); |
61 | 61 |
|
62 |
qemu_free(req);
|
|
62 |
g_free(req);
|
|
63 | 63 |
} |
64 | 64 |
|
65 | 65 |
static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error, |
... | ... | |
117 | 117 |
|
118 | 118 |
static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s) |
119 | 119 |
{ |
120 |
VirtIOBlockReq *req = qemu_malloc(sizeof(*req));
|
|
120 |
VirtIOBlockReq *req = g_malloc(sizeof(*req));
|
|
121 | 121 |
req->dev = s; |
122 | 122 |
req->qiov.size = 0; |
123 | 123 |
req->next = NULL; |
... | ... | |
130 | 130 |
|
131 | 131 |
if (req != NULL) { |
132 | 132 |
if (!virtqueue_pop(s->vq, &req->elem)) { |
133 |
qemu_free(req);
|
|
133 |
g_free(req);
|
|
134 | 134 |
return NULL; |
135 | 135 |
} |
136 | 136 |
} |
Also available in: Unified diff