mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
Fix a bunch of mistakes detected with scan-build
This commit is contained in:
parent
ac78c6642a
commit
bb79ada49f
10 changed files with 19 additions and 9 deletions
|
|
@ -405,7 +405,7 @@ void roots_config_destroy(struct roots_config *config) {
|
|||
}
|
||||
|
||||
struct roots_keyboard_config *kc, *ktmp = NULL;
|
||||
wl_list_for_each_safe(kc, ktmp, &config->bindings, link) {
|
||||
wl_list_for_each_safe(kc, ktmp, &config->keyboards, link) {
|
||||
free(kc->name);
|
||||
free(kc->rules);
|
||||
free(kc->model);
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ struct roots_cursor *roots_cursor_create(struct roots_seat *seat) {
|
|||
}
|
||||
cursor->cursor = wlr_cursor_create();
|
||||
if (!cursor->cursor) {
|
||||
free(cursor);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ static bool keyboard_keysyms_xkb(struct roots_keyboard *keyboard,
|
|||
uint32_t consumed = xkb_state_key_get_consumed_mods2(
|
||||
keyboard->device->keyboard->xkb_state, keycode, XKB_CONSUMED_MODE_XKB);
|
||||
|
||||
// TODO: actually use this value
|
||||
modifiers = modifiers & ~consumed;
|
||||
|
||||
bool handled = false;
|
||||
|
|
|
|||
|
|
@ -252,7 +252,6 @@ struct roots_seat *roots_seat_create(struct roots_input *input, char *name) {
|
|||
seat->seat = wlr_seat_create(input->server->wl_display, name);
|
||||
if (!seat->seat) {
|
||||
free(seat);
|
||||
roots_cursor_destroy(seat->cursor);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue