diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2007-08-06 03:05:09 +0200 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2007-08-06 03:09:55 +0200 |
| commit | 7f5347897754164c9688d7e3d882411283c13a55 (patch) | |
| tree | 659c8c8a8c98d168a1641929bb3b95dac0d59200 | |
| parent | d5dc910d6dc4ca3ef0e808a18dbe91b6098266cf (diff) | |
Fix some memleaks
| -rw-r--r-- | openbox/config.c | 8 | ||||
| -rw-r--r-- | openbox/translate.c | 1 | ||||
| -rw-r--r-- | render/theme.c | 16 |
3 files changed, 5 insertions, 20 deletions
diff --git a/openbox/config.c b/openbox/config.c index 2bdd1966..1bf63e58 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -320,14 +320,14 @@ static void parse_per_app_settings(ObParseInst *i, xmlDocPtr doc, config_per_app_settings = g_slist_append(config_per_app_settings, (gpointer) settings); + g_free(name); + g_free(class); + g_free(role); + name = class = role = NULL; } app = parse_find_node("application", app->next); } - - g_free(name); - g_free(class); - g_free(role); } /* diff --git a/openbox/translate.c b/openbox/translate.c index 5b2b4ebe..e7962ad5 100644 --- a/openbox/translate.c +++ b/openbox/translate.c @@ -179,5 +179,6 @@ gunichar translate_unichar(guint keycode) if (unikey == (gunichar)-1 || unikey == (gunichar)-2 || unikey == 0) unikey = 0; } + g_free(key); return unikey; } diff --git a/render/theme.c b/render/theme.c index 0de3dc74..d188e6ae 100644 --- a/render/theme.c +++ b/render/theme.c @@ -115,7 +115,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->a_menu_normal = RrAppearanceNew(inst, 0); theme->a_menu_selected = RrAppearanceNew(inst, 0); theme->a_menu_disabled = RrAppearanceNew(inst, 0); - theme->a_menu_disabled_selected = RrAppearanceNew(inst, 0); theme->a_menu_text_normal = RrAppearanceNew(inst, 1); theme->a_menu_text_selected = RrAppearanceNew(inst, 1); theme->a_menu_text_disabled = RrAppearanceNew(inst, 1); @@ -543,21 +542,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, OB_DEFAULT_ICON_HEIGHT, OB_DEFAULT_ICON_pixel_data); - /* the toggled hover mask = the toggled unpressed mask (i.e. no change) */ - theme->max_toggled_hover_mask = - RrPixmapMaskCopy(theme->max_toggled_mask); - theme->desk_toggled_hover_mask = - RrPixmapMaskCopy(theme->desk_toggled_mask); - theme->shade_toggled_hover_mask = - RrPixmapMaskCopy(theme->shade_toggled_mask); - /* the toggled pressed mask = the toggled unpressed mask (i.e. no change)*/ - theme->max_toggled_pressed_mask = - RrPixmapMaskCopy(theme->max_toggled_mask); - theme->desk_toggled_pressed_mask = - RrPixmapMaskCopy(theme->desk_toggled_mask); - theme->shade_toggled_pressed_mask = - RrPixmapMaskCopy(theme->shade_toggled_mask); - /* read the decoration textures */ if (!read_appearance(db, inst, "window.active.title.bg", theme->a_focused_title, |
