From 9bcc6216c81dafac809b3669b200565e600831b4 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Wed, 26 Jan 2011 01:51:46 +0100 Subject: [PATCH] Bugfix: Also free() the head of slist/tailq (Thx dothebart) --- i3bar/src/workspaces.c | 2 +- i3bar/src/xcb.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/i3bar/src/workspaces.c b/i3bar/src/workspaces.c index 0393071e..89f7757d 100644 --- a/i3bar/src/workspaces.c +++ b/i3bar/src/workspaces.c @@ -250,7 +250,7 @@ void parse_workspaces_json(char *json) { } /* - * free() all workspace data-structures + * free() all workspace data-structures. Does not free() the heads of the tailqueues. * */ void free_workspaces() { diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index f775aad3..e481e314 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -585,8 +585,10 @@ void clean_xcb() { SLIST_FOREACH(o_walk, outputs, slist) { destroy_window(o_walk); FREE_TAILQ(o_walk->workspaces, i3_ws); + FREE(o_walk->workspaces); } FREE_SLIST(outputs, i3_output); + FREE(outputs); xcb_disconnect(xcb_connection); -- 2.39.5