aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c
index 95cd8b0d..5ece2810 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -249,8 +249,7 @@ bool read_config(FILE *file, bool is_active) {
sway_log(L_ERROR, "Invalid command during config ``%s''", line);
} else if (handler->config_type == CMD_COMPOSITOR_READY && !is_active) {
sway_log(L_DEBUG, "Deferring command ``%s''", line);
- char *cmd = malloc(strlen(line) + 1);
- strcpy(cmd, line);
+ char *cmd = strdup(line);
list_add(config->cmd_queue, cmd);
} else if (!handle_command(line)) {
sway_log(L_DEBUG, "Config load failed for line ``%s''", line);