aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/seat.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-02-11 03:26:12 -0500
committerLibravatar emersion <contact@emersion.fr>2019-02-11 10:10:48 +0100
commitd2c896ed84534f5c4dc7e8c30c3e92be4081fab1 (patch)
treee1de3ad589e623ec08b7391a2172ee97a50b4263 /sway/commands/seat.c
parentipc: handle unnamed xkb_active_layout_name (diff)
downloadsway-d2c896ed84534f5c4dc7e8c30c3e92be4081fab1.tar.gz
sway-d2c896ed84534f5c4dc7e8c30c3e92be4081fab1.tar.zst
sway-d2c896ed84534f5c4dc7e8c30c3e92be4081fab1.zip
fix misc memory leaks
This fixes a few misc memory leaks reported by asan: - Items of `config->config_chain` are now freed instead of just the list itself - `bar->swaybar_command` is now freed - The result returned by a seat subcommand is now returned instead of leaked
Diffstat (limited to 'sway/commands/seat.c')
-rw-r--r--sway/commands/seat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/seat.c b/sway/commands/seat.c
index 5b23dcc6..aa36ba95 100644
--- a/sway/commands/seat.c
+++ b/sway/commands/seat.c
@@ -50,5 +50,5 @@ struct cmd_results *cmd_seat(int argc, char **argv) {
50 } 50 }
51 51
52 config->handler_context.seat_config = NULL; 52 config->handler_context.seat_config = NULL;
53 return cmd_results_new(CMD_SUCCESS, NULL); 53 return res ? res : cmd_results_new(CMD_SUCCESS, NULL);
54} 54}