summaryrefslogtreecommitdiffstats
path: root/hw/xenfb.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-08-21 05:09:37 +0200
committerAnthony Liguori2011-08-21 06:01:08 +0200
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/xenfb.c
parentMake glib mandatory and fixup utils appropriately (diff)
downloadqemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.xz
qemu-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.zip
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/xenfb.c')
-rw-r--r--hw/xenfb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/xenfb.c b/hw/xenfb.c
index 0a01ae30cc..d532d3e898 100644
--- a/hw/xenfb.c
+++ b/hw/xenfb.c
@@ -366,7 +366,7 @@ static int input_connect(struct XenDevice *xendev)
/* there is no vfb, run vkbd on its own */
in->c.ds = get_displaystate();
} else {
- qemu_free(vfb);
+ g_free(vfb);
xen_be_printf(xendev, 1, "ds not set (yet)\n");
return -1;
}
@@ -483,8 +483,8 @@ static int xenfb_map_fb(struct XenFB *xenfb)
n_fbdirs = xenfb->fbpages * mode / 8;
n_fbdirs = (n_fbdirs + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
- pgmfns = qemu_mallocz(sizeof(unsigned long) * n_fbdirs);
- fbmfns = qemu_mallocz(sizeof(unsigned long) * xenfb->fbpages);
+ pgmfns = g_malloc0(sizeof(unsigned long) * n_fbdirs);
+ fbmfns = g_malloc0(sizeof(unsigned long) * xenfb->fbpages);
xenfb_copy_mfns(mode, n_fbdirs, pgmfns, pd);
map = xc_map_foreign_pages(xen_xc, xenfb->c.xendev.dom,
@@ -502,8 +502,8 @@ static int xenfb_map_fb(struct XenFB *xenfb)
ret = 0; /* all is fine */
out:
- qemu_free(pgmfns);
- qemu_free(fbmfns);
+ g_free(pgmfns);
+ g_free(fbmfns);
return ret;
}