sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit fb41371444110949c54d5a60e917a0bb6fa9d366
parent c55ae9956b69979e3f7c504d2fb727c5d76198a2
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 29 Apr 2016 11:25:26 -0400

Merge pull request #614 from neosilky/memleak

sway/commands.c: add some free calls to release allocated memory
Diffstat:
Msway/commands.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/sway/commands.c b/sway/commands.c @@ -245,6 +245,7 @@ static struct cmd_results *cmd_bindsym(int argc, char **argv) { argv++; argc--; } else { + free_sway_binding(binding); return cmd_results_new(CMD_FAILURE, "bindsym", "Invalid bindsym command" "(expected more than 2 arguments, got %d)", argc); @@ -310,6 +311,7 @@ static struct cmd_results *cmd_bindcode(int argc, char **argv) { argv++; argc--; } else { + free_sway_binding(binding); return cmd_results_new(CMD_FAILURE, "bindcode", "Invalid bindcode command" "(expected more than 2 arguments, got %d)", argc); @@ -531,6 +533,7 @@ static struct cmd_results *cmd_exec_always(int argc, char **argv) { close(fd[1]); _exit(0); // Close child process } else if (pid < 0) { + free(child); return cmd_results_new(CMD_FAILURE, "exec_always", "Command failed (sway could not fork)."); } close(fd[1]); // close write