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

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

View 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);
}
}