Fix some memleaks
Mikael Magnusson mikachu@comhem.se
3 files changed,
5 insertions(+),
20 deletions(-)
M
openbox/config.c
→
openbox/config.c
@@ -320,14 +320,14 @@ }
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); } /*
M
openbox/translate.c
→
openbox/translate.c
@@ -179,5 +179,6 @@ unikey = g_utf8_get_char_validated(key, -1);
if (unikey == (gunichar)-1 || unikey == (gunichar)-2 || unikey == 0) unikey = 0; } + g_free(key); return unikey; }
M
render/theme.c
→
render/theme.c
@@ -115,7 +115,6 @@ theme->a_menu_text_title = RrAppearanceNew(inst, 1);
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);@@ -542,21 +541,6 @@ /* setup the default window icon */
theme->def_win_icon = read_c_image(OB_DEFAULT_ICON_WIDTH, 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,