From 1fe4e635b583eb30ea50ba1ab2be862e9e84ac77 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Mon, 19 Mar 2018 02:02:59 +0200 Subject: [PATCH] Fix memleak: FREE(assign->dest.output) --- include/data.h | 2 +- src/config.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.2