]> Dogcows Code - chaz/openbox/commitdiff
Fix some memleaks
authorMikael Magnusson <mikachu@comhem.se>
Mon, 6 Aug 2007 01:05:09 +0000 (03:05 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Mon, 6 Aug 2007 01:09:55 +0000 (03:09 +0200)
openbox/config.c
openbox/translate.c
render/theme.c

index 2bdd1966ef4012297e8c19f2fe15ecfa87cf8558..1bf63e58134f77afb3b26fc7ea6e62c128f5147b 100644 (file)
@@ -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);
 }
 
 /*
index 5b2b4ebee056ff60d3ffd6580dfa74a7d4db5303..e7962ad575561b2f89e3e8d7e72e94b643eb1e9f 100644 (file)
@@ -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;
 }
index 0de3dc745d42662ae09599bb761731e6d31ade29..d188e6ae7fc99615cf0c629994e6605255afdf72 100644 (file)
@@ -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,
This page took 0.026953 seconds and 4 git commands to generate.