From 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sat, 20 Aug 2011 22:09:37 -0500 Subject: Use glib memory allocation and free functions qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori --- input.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index 310bad58fd..e2f7c92a71 100644 --- a/input.c +++ b/input.c @@ -73,12 +73,12 @@ QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, QEMUPutMouseEntry *s; static int mouse_index = 0; - s = qemu_mallocz(sizeof(QEMUPutMouseEntry)); + s = g_malloc0(sizeof(QEMUPutMouseEntry)); s->qemu_put_mouse_event = func; s->qemu_put_mouse_event_opaque = opaque; s->qemu_put_mouse_event_absolute = absolute; - s->qemu_put_mouse_event_name = qemu_strdup(name); + s->qemu_put_mouse_event_name = g_strdup(name); s->index = mouse_index++; QTAILQ_INSERT_TAIL(&mouse_handlers, s, node); @@ -100,8 +100,8 @@ void qemu_remove_mouse_event_handler(QEMUPutMouseEntry *entry) { QTAILQ_REMOVE(&mouse_handlers, entry, node); - qemu_free(entry->qemu_put_mouse_event_name); - qemu_free(entry); + g_free(entry->qemu_put_mouse_event_name); + g_free(entry); check_mode_change(); } @@ -111,7 +111,7 @@ QEMUPutLEDEntry *qemu_add_led_event_handler(QEMUPutLEDEvent *func, { QEMUPutLEDEntry *s; - s = qemu_mallocz(sizeof(QEMUPutLEDEntry)); + s = g_malloc0(sizeof(QEMUPutLEDEntry)); s->put_led = func; s->opaque = opaque; @@ -124,7 +124,7 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry) if (entry == NULL) return; QTAILQ_REMOVE(&led_handlers, entry, next); - qemu_free(entry); + g_free(entry); } void kbd_put_keycode(int keycode) -- cgit v1.2.3