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 --- libcacard/vreader.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libcacard/vreader.c') diff --git a/libcacard/vreader.c b/libcacard/vreader.c index 4a0125b0e2..ec126dfa46 100644 --- a/libcacard/vreader.c +++ b/libcacard/vreader.c @@ -46,7 +46,7 @@ vreader_new(const char *name, VReaderEmul *private, { VReader *reader; - reader = (VReader *)qemu_malloc(sizeof(VReader)); + reader = (VReader *)g_malloc(sizeof(VReader)); qemu_mutex_init(&reader->lock); reader->reference_count = 1; reader->name = name ? strdup(name) : NULL; @@ -87,12 +87,12 @@ vreader_free(VReader *reader) vcard_free(reader->card); } if (reader->name) { - qemu_free(reader->name); + g_free(reader->name); } if (reader->reader_private_free) { reader->reader_private_free(reader->reader_private); } - qemu_free(reader); + g_free(reader); return; } @@ -237,7 +237,7 @@ vreader_list_entry_new(VReader *reader) VReaderListEntry *new_reader_list_entry; new_reader_list_entry = (VReaderListEntry *) - qemu_malloc(sizeof(VReaderListEntry)); + g_malloc(sizeof(VReaderListEntry)); new_reader_list_entry->next = NULL; new_reader_list_entry->prev = NULL; new_reader_list_entry->reader = vreader_reference(reader); @@ -251,7 +251,7 @@ vreader_list_entry_delete(VReaderListEntry *entry) return; } vreader_free(entry->reader); - qemu_free(entry); + g_free(entry); } @@ -260,7 +260,7 @@ vreader_list_new(void) { VReaderList *new_reader_list; - new_reader_list = (VReaderList *)qemu_malloc(sizeof(VReaderList)); + new_reader_list = (VReaderList *)g_malloc(sizeof(VReaderList)); new_reader_list->head = NULL; new_reader_list->tail = NULL; return new_reader_list; @@ -278,7 +278,7 @@ vreader_list_delete(VReaderList *list) } list->head = NULL; list->tail = NULL; - qemu_free(list); + g_free(list); } -- cgit v1.2.3