diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /ui/keymaps.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) |
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 'ui/keymaps.c')
-rw-r--r-- | ui/keymaps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/keymaps.c b/ui/keymaps.c index 78c7ea375c..81003bb5ca 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -52,7 +52,7 @@ static void add_to_key_range(struct key_range **krp, int code) { } } if (kr == NULL) { - kr = qemu_mallocz(sizeof(*kr)); + kr = g_malloc0(sizeof(*kr)); kr->start = kr->end = code; kr->next = *krp; *krp = kr; @@ -94,13 +94,13 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table, filename = qemu_find_file(QEMU_FILE_TYPE_KEYMAP, language); if (!k) - k = qemu_mallocz(sizeof(kbd_layout_t)); + k = g_malloc0(sizeof(kbd_layout_t)); if (!(filename && (f = fopen(filename, "r")))) { fprintf(stderr, "Could not read keymap file: '%s'\n", language); return NULL; } - qemu_free(filename); + g_free(filename); for(;;) { if (fgets(line, 1024, f) == NULL) break; |