Bugfix: free() workspace-names seperately (thx dothebart)

This commit is contained in:
Axel Wagner 2011-01-26 00:34:15 +01:00
parent 9c7db93993
commit 31863efc04
1 changed files with 6 additions and 0 deletions

View File

@ -258,8 +258,14 @@ void free_workspaces() {
if (outputs == NULL) { if (outputs == NULL) {
return; return;
} }
i3_ws *ws_walk;
SLIST_FOREACH(outputs_walk, outputs, slist) { SLIST_FOREACH(outputs_walk, outputs, slist) {
if (outputs_walk->workspaces != NULL && !TAILQ_EMPTY(outputs_walk->workspaces)) { 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); FREE_TAILQ(outputs_walk->workspaces, i3_ws);
} }
} }