]> git.proxmox.com Git - qemu.git/blobdiff - hw/mcf_fec.c
Use glib memory allocation and free functions
[qemu.git] / hw / mcf_fec.c
index 748eb5906b94238a08292ace2ae6a1a0c2381945..42a5d779521188cf4eb96bf565edd209146aec13 100644 (file)
@@ -447,7 +447,7 @@ static void mcf_fec_cleanup(VLANClientState *nc)
 
     cpu_unregister_io_memory(s->mmio_index);
 
-    qemu_free(s);
+    g_free(s);
 }
 
 static NetClientInfo net_mcf_fec_info = {
@@ -464,7 +464,7 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
 
     qemu_check_nic_model(nd, "mcf_fec");
 
-    s = (mcf_fec_state *)qemu_mallocz(sizeof(mcf_fec_state));
+    s = (mcf_fec_state *)g_malloc0(sizeof(mcf_fec_state));
     s->irq = irq;
     s->mmio_index = cpu_register_io_memory(mcf_fec_readfn,
                                            mcf_fec_writefn, s,