From 9559e3e2afeabc5fd68ee0679ad9b5745c92425b Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Sun, 15 Jul 2018 21:51:00 +0100 Subject: [PATCH] config output: free command string if unused --- sway/config/output.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sway/config/output.c b/sway/config/output.c index 205e2633c..1bf9e5f11 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -207,6 +207,8 @@ void apply_output_config(struct output_config *oc, struct sway_container *output output->sway_output->bg_pid = fork(); if (output->sway_output->bg_pid == 0) { execvp(cmd[0], cmd); + } else { + free(command); } } if (oc && oc->dpms_state != DPMS_IGNORE) {