aboutsummaryrefslogtreecommitdiff
path: root/ui/keymaps.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/keymaps.c')
-rw-r--r--ui/keymaps.c6
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;