aboutsummaryrefslogtreecommitdiff
path: root/libcacard/vreader.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-08-20 22:09:37 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-20 23:01:08 -0500
commit7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch)
tree9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /libcacard/vreader.c
parent14015304b662e8f8ccce46c5a6927af6a14c510b (diff)
downloadqemu-arm-7267c0947d7e8ae5dff7bafd932c3bc285f43e5c.tar.gz
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 'libcacard/vreader.c')
-rw-r--r--libcacard/vreader.c14
1 files changed, 7 insertions, 7 deletions
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);
}