config: add a couple of forgotten frees

This commit is contained in:
Dominique Martinet 2018-07-04 18:43:35 +09:00
parent 8a771785ad
commit 9f5d539657
2 changed files with 7 additions and 1 deletions

View File

@ -87,7 +87,12 @@ void free_config(struct sway_config *config) {
list_free(config->cmd_queue);
list_free(config->workspace_outputs);
list_free(config->pid_workspaces);
if (config->output_configs) {
for (int i = 0; i < config->output_configs->length; i++) {
free_output_config(config->output_configs->items[i]);
}
list_free(config->output_configs);
}
if (config->input_configs) {
for (int i = 0; i < config->input_configs->length; i++) {
free_input_config(config->input_configs->items[i]);

View File

@ -30,6 +30,7 @@ void free_bar_config(struct bar_config *bar) {
if (!bar) {
return;
}
free(bar->id);
free(bar->mode);
free(bar->position);
free(bar->hidden_state);