Merge pull request #3187 from orestisf1993/assign-memleak

Fix memleak: FREE(assign->dest.output)
next
Ingo Bürk 2018-03-19 07:03:47 +01:00 committed by GitHub
commit b721a40fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -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);