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/vhost_net.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/vhost_net.c')
-rw-r--r-- | hw/vhost_net.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/vhost_net.c b/hw/vhost_net.c index b6dc592db0..a55981200d 100644 --- a/hw/vhost_net.c +++ b/hw/vhost_net.c @@ -92,7 +92,7 @@ struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd, bool force) { int r; - struct vhost_net *net = qemu_malloc(sizeof *net); + struct vhost_net *net = g_malloc(sizeof *net); if (!backend) { fprintf(stderr, "vhost-net requires backend to be setup\n"); goto fail; @@ -125,7 +125,7 @@ struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd, vhost_net_ack_features(net, 0); return net; fail: - qemu_free(net); + g_free(net); return NULL; } @@ -198,7 +198,7 @@ void vhost_net_cleanup(struct vhost_net *net) if (net->dev.acked_features & (1 << VIRTIO_NET_F_MRG_RXBUF)) { tap_set_vnet_hdr_len(net->vc, sizeof(struct virtio_net_hdr)); } - qemu_free(net); + g_free(net); } #else struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd, |