aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2019-02-21 08:36:58 +0100
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-02-25 17:10:04 -0500
commitdfe42cbac2c51592759c19efe8abc23f847f5bb2 (patch)
tree6d93c897744d6a03b4e65f0186cc875f39da1cad
parentoutput_evacuate: call workspace_consider_destroy (diff)
downloadsway-dfe42cbac2c51592759c19efe8abc23f847f5bb2.tar.gz
sway-dfe42cbac2c51592759c19efe8abc23f847f5bb2.tar.zst
sway-dfe42cbac2c51592759c19efe8abc23f847f5bb2.zip
ipc-client: free payload after sending it over the socket
Fixes memory leaks in the form of: Direct leak of 20 byte(s) in 1 object(s) allocated from: #0 0x7f5f7c2f4f30 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xedf30) #1 0x563c7995b36a in join_args ../common/stringop.c:268 #2 0x563c798a6a1a in main ../sway/main.c:348 #3 0x7f5f7b4d609a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
-rw-r--r--sway/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index b118a182..5a65e50c 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -347,6 +347,7 @@ int main(int argc, char **argv) {
347 } 347 }
348 char *command = join_args(argv + optind, argc - optind); 348 char *command = join_args(argv + optind, argc - optind);
349 run_as_ipc_client(command, socket_path); 349 run_as_ipc_client(command, socket_path);
350 free(command);
350 return 0; 351 return 0;
351 } 352 }
352 353