]> git.sur5r.net Git - i3/i3/commitdiff
Fix memleak: FREE(assign->dest.output) 3187/head
authorOrestis Floros <orestisf1993@gmail.com>
Mon, 19 Mar 2018 00:02:59 +0000 (02:02 +0200)
committerOrestis Floros <orestisf1993@gmail.com>
Mon, 19 Mar 2018 00:02:59 +0000 (02:02 +0200)
include/data.h
src/config.c

index 69a46e464331172172873a70940af6d348cb09bd..32fb098f970bb1bed29e036b9bb46550882e851e 100644 (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;
index 24c7b541e447e4f80ab2b676c4d3f0b140bdff6c..2d5d78afa5805a10085a6ec3bb24e9422671825f 100644 (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);