]> git.proxmox.com Git - mirror_qemu.git/blobdiff - async.c
Use glib memory allocation and free functions
[mirror_qemu.git] / async.c
diff --git a/async.c b/async.c
index 3fe70b9debb37fef3d6c9d567f09a3fe1bc2881c..9d4e960b021866dd14b0c761d1cd5bda2b49fe3c 100644 (file)
--- a/async.c
+++ b/async.c
@@ -43,7 +43,7 @@ struct QEMUBH {
 QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
 {
     QEMUBH *bh;
-    bh = qemu_mallocz(sizeof(QEMUBH));
+    bh = g_malloc0(sizeof(QEMUBH));
     bh->cb = cb;
     bh->opaque = opaque;
     bh->next = first_bh;
@@ -74,7 +74,7 @@ int qemu_bh_poll(void)
         bh = *bhp;
         if (bh->deleted) {
             *bhp = bh->next;
-            qemu_free(bh);
+            g_free(bh);
         } else
             bhp = &bh->next;
     }