diff --git a/src/menu/actions.c b/src/menu/actions.c index 00317168..4cafbce7 100644 --- a/src/menu/actions.c +++ b/src/menu/actions.c @@ -25,8 +25,8 @@ static void actions_clear (menu_t *menu) { } static void actions_update_direction (menu_t *menu) { - joypad_8way_t held_dir; - joypad_8way_t fast_dir; + joypad_8way_t held_dir = JOYPAD_8WAY_NONE; + joypad_8way_t fast_dir = JOYPAD_8WAY_NONE; JOYPAD_PORT_FOREACH (i) { held_dir = joypad_get_direction(i, JOYPAD_2D_DPAD | JOYPAD_2D_STICK); @@ -90,7 +90,7 @@ static void actions_update_direction (menu_t *menu) { } static void actions_update_buttons (menu_t *menu) { - joypad_buttons_t pressed; + joypad_buttons_t pressed = {0}; JOYPAD_PORT_FOREACH (i) { pressed = joypad_get_buttons_pressed(i); diff --git a/src/menu/rom_info.c b/src/menu/rom_info.c index e5b750ce..b313950c 100644 --- a/src/menu/rom_info.c +++ b/src/menu/rom_info.c @@ -835,6 +835,7 @@ static rom_err_t save_override (path_t *path, const char *id, int value, int def mini_t *ini = mini_try_load(path_get(overrides_path)); if (!ini) { + path_free(overrides_path); return ROM_ERR_SAVE_IO; }