From 9d22b2916629330e4902dc9747da5a8b90c09d09 Mon Sep 17 00:00:00 2001
From: Axel Wagner <mail@merovius.de>
Date: Wed, 26 Jan 2011 01:38:48 +0100
Subject: [PATCH] Bugfix: free() workspace-list of outputs seperately (thx
 dothebart)

---
 i3bar/src/xcb.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c
index a6d667bc..b48a6ad9 100644
--- a/i3bar/src/xcb.c
+++ b/i3bar/src/xcb.c
@@ -579,9 +579,10 @@ void init_xcb(char *fontname) {
  *
  */
 void clean_xcb() {
-    i3_output *walk;
-    SLIST_FOREACH(walk, outputs, slist) {
-        destroy_window(walk);
+    i3_output *o_walk;
+    SLIST_FOREACH(o_walk, outputs, slist) {
+        destroy_window(o_walk);
+        FREE_TAILQ(o_walk->workspaces, i3_ws);
     }
     FREE_SLIST(outputs, i3_output);