Bugfix: Correctly free old assignments when reloading

Fixes #516
This commit is contained in:
Michael Stapelberg
2011-09-11 23:41:46 +01:00
parent f3716e45cf
commit dc790cfa32
6 changed files with 52 additions and 4 deletions

View File

@ -280,15 +280,19 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
SLIST_REMOVE(&modes, mode, Mode, modes);
}
#if 0
struct Assignment *assign;
while (!TAILQ_EMPTY(&assignments)) {
assign = TAILQ_FIRST(&assignments);
FREE(assign->windowclass_title);
if (assign->type == A_TO_WORKSPACE)
FREE(assign->dest.workspace);
else if (assign->type == A_TO_OUTPUT)
FREE(assign->dest.output);
else if (assign->type == A_COMMAND)
FREE(assign->dest.command);
match_free(&(assign->match));
TAILQ_REMOVE(&assignments, assign, assignments);
FREE(assign);
}
#endif
/* Clear workspace names */
#if 0