aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input.c')
-rw-r--r--sway/input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sway/input.c b/sway/input.c
index 61757ab8..249d95c6 100644
--- a/sway/input.c
+++ b/sway/input.c
@@ -11,8 +11,16 @@
11 11
12struct input_config *new_input_config(const char* identifier) { 12struct input_config *new_input_config(const char* identifier) {
13 struct input_config *input = calloc(1, sizeof(struct input_config)); 13 struct input_config *input = calloc(1, sizeof(struct input_config));
14 if (!input) {
15 sway_log(L_DEBUG, "Unable to allocate input config");
16 return NULL;
17 }
14 sway_log(L_DEBUG, "new_input_config(%s)", identifier); 18 sway_log(L_DEBUG, "new_input_config(%s)", identifier);
15 input->identifier = strdup(identifier); 19 if (!(input->identifier = strdup(identifier))) {
20 free(input);
21 sway_log(L_DEBUG, "Unable to allocate input config");
22 return NULL;
23 }
16 24
17 input->tap = INT_MIN; 25 input->tap = INT_MIN;
18 input->drag_lock = INT_MIN; 26 input->drag_lock = INT_MIN;