diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2006-06-08 10:34:15 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2006-06-08 10:34:15 +0000 |
| commit | 9aeb9d9fb5e4628ea119f1408f7bd16c96410224 (patch) | |
| tree | 812b70d19bfd9d9d9611fb0ece464bd3f557f2bf /openbox/config.c | |
| parent | 3c3415d87b3ab0f5b141fa4b122d80ed23616dfd (diff) | |
define vars in proper places and don't leak the entire list of settings
Diffstat (limited to 'openbox/config.c')
| -rw-r--r-- | openbox/config.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/openbox/config.c b/openbox/config.c index 7f51c0f0..78a8ed54 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -80,7 +80,7 @@ gint config_resist_edge; gboolean config_resist_layers_below; -GSList *per_app_settings; +GSList *config_per_app_settings; /* <applications> @@ -174,7 +174,7 @@ static void parse_per_app_settings(ObParseInst *i, xmlDocPtr doc, setting->layer = 0; } - per_app_settings = g_slist_append(per_app_settings, + config_per_app_settings = g_slist_append(config_per_app_settings, (gpointer) setting); } @@ -728,7 +728,7 @@ void config_startup(ObParseInst *i) parse_register(i, "menu", parse_menu, NULL); - per_app_settings = NULL; + config_per_app_settings = NULL; parse_register(i, "applications", parse_per_app_settings, NULL); } @@ -748,4 +748,8 @@ void config_shutdown() for (it = config_menu_files; it; it = g_slist_next(it)) g_free(it->data); g_slist_free(config_menu_files); + + for (it = config_per_app_settings; it; it = g_slist_next(it)) + g_free(it->data); + g_slist_free(config_per_app_settings); } |
