From: Orestis Floros Date: Mon, 19 Mar 2018 00:02:59 +0000 (+0200) Subject: Fix memleak: FREE(assign->dest.output) X-Git-Tag: 4.16~127^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1fe4e635b583eb30ea50ba1ab2be862e9e84ac77;p=i3%2Fi3 Fix memleak: FREE(assign->dest.output) --- diff --git a/include/data.h b/include/data.h index 69a46e46..32fb098f 100644 --- a/include/data.h +++ b/include/data.h @@ -573,7 +573,7 @@ struct Assignment { /** the criteria to check if a window matches */ Match match; - /** destination workspace/command, depending on the type */ + /** destination workspace/command/output, depending on the type */ union { char *command; char *workspace; diff --git a/src/config.c b/src/config.c index 24c7b541..2d5d78af 100644 --- a/src/config.c +++ b/src/config.c @@ -103,6 +103,8 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath, FREE(assign->dest.workspace); else if (assign->type == A_COMMAND) FREE(assign->dest.command); + else if (assign->type == A_TO_OUTPUT) + FREE(assign->dest.output); match_free(&(assign->match)); TAILQ_REMOVE(&assignments, assign, assignments); FREE(assign);