aboutsummaryrefslogtreecommitdiff
path: root/rootston/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/keyboard.c')
-rw-r--r--rootston/keyboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rootston/keyboard.c b/rootston/keyboard.c
index 72567eef..bb748550 100644
--- a/rootston/keyboard.c
+++ b/rootston/keyboard.c
@@ -249,6 +249,10 @@ struct roots_keyboard *roots_keyboard_create(struct wlr_input_device *device,
keyboard->input = input;
struct keyboard_config *config = calloc(1, sizeof(struct keyboard_config));
+ if (config == NULL) {
+ free(keyboard);
+ return NULL;
+ }
keyboard_config_merge(config, config_get_keyboard(input->config, device));
keyboard_config_merge(config, config_get_keyboard(input->config, NULL));