Revision 7267c094 hw/stellaris_input.c

b/hw/stellaris_input.c
77 77
    gamepad_state *s;
78 78
    int i;
79 79

  
80
    s = (gamepad_state *)qemu_mallocz(sizeof (gamepad_state));
81
    s->buttons = (gamepad_button *)qemu_mallocz(n * sizeof (gamepad_button));
80
    s = (gamepad_state *)g_malloc0(sizeof (gamepad_state));
81
    s->buttons = (gamepad_button *)g_malloc0(n * sizeof (gamepad_button));
82 82
    for (i = 0; i < n; i++) {
83 83
        s->buttons[i].irq = irq[i];
84 84
        s->buttons[i].keycode = keycode[i];

Also available in: Unified diff