aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-11-16 10:30:54 +0100
committeremersion <contact@emersion.fr>2017-11-16 10:30:54 +0100
commitbb79ada49f43be5417bdd55fda3a7cf07c2a69df (patch)
tree259eaade516ed43c99c78591741b4e4ef0d77b7d /rootston
parentac78c6642a1c742c896f08282ee31c4f0d3acd51 (diff)
Fix a bunch of mistakes detected with scan-build
Diffstat (limited to 'rootston')
-rw-r--r--rootston/config.c2
-rw-r--r--rootston/cursor.c2
-rw-r--r--rootston/keyboard.c1
-rw-r--r--rootston/seat.c1
4 files changed, 3 insertions, 3 deletions
diff --git a/rootston/config.c b/rootston/config.c
index 7ffbb786..727b52d0 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -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);
diff --git a/rootston/cursor.c b/rootston/cursor.c
index ecd5e9a0..5949a364 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -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;
}
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index c118e55c..fb648ae5 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -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;
diff --git a/rootston/seat.c b/rootston/seat.c
index 6d8dc749..1fa37c44 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -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;
}