]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: free() workspace-names seperately (thx dothebart)
authorAxel Wagner <mail@merovius.de>
Tue, 25 Jan 2011 23:34:15 +0000 (00:34 +0100)
committerAxel Wagner <mail@merovius.de>
Wed, 26 Jan 2011 01:00:29 +0000 (02:00 +0100)
i3bar/src/workspaces.c

index a28ed2beb0fafa0d839e7f36cc8a237ab1bc993d..0393071e6425b09d3dfa8c02c2d09c1ab941d712 100644 (file)
@@ -258,8 +258,14 @@ void free_workspaces() {
     if (outputs == NULL) {
         return;
     }
+    i3_ws     *ws_walk;
+
     SLIST_FOREACH(outputs_walk, outputs, slist) {
         if (outputs_walk->workspaces != NULL && !TAILQ_EMPTY(outputs_walk->workspaces)) {
+            TAILQ_FOREACH(ws_walk, outputs_walk->workspaces, tailq) {
+                FREE(ws_walk->name);
+                FREE(ws_walk->ucs2_name);
+            }
             FREE_TAILQ(outputs_walk->workspaces, i3_ws);
         }
     }