From d2c896ed84534f5c4dc7e8c30c3e92be4081fab1 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Mon, 11 Feb 2019 03:26:12 -0500 Subject: 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 --- sway/commands/seat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands') 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) { } config->handler_context.seat_config = NULL; - return cmd_results_new(CMD_SUCCESS, NULL); + return res ? res : cmd_results_new(CMD_SUCCESS, NULL); } -- cgit v1.2.3