Index: gnome-settings-daemon/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/ChangeLog,v
retrieving revision 1.141.2.1
diff -u -r1.141.2.1 ChangeLog
--- gnome-settings-daemon/ChangeLog	18 Jun 2004 19:38:17 -0000	1.141.2.1
+++ gnome-settings-daemon/ChangeLog	5 Sep 2004 19:04:01 -0000
@@ -1,3 +1,14 @@
+2004-09-05  Thomas Cataldo  <thomas.cataldo@aliacom.fr>
+
+	Bunch of leak fixes.
+	
+	* gnome-settings-default-editor.c: (vfs_change_cb):
+	* gnome-settings-font.c: (load_cursor):
+	* gnome-settings-gtk1theme.c: (apply_settings):
+	* gnome-settings-keyboard.c: (apply_settings):
+	* gnome-settings-multimedia-keys.c: (init_kbd):
+	* gnome-settings-xsettings.c: (gnome_settings_xsettings_load):
+
 2004-06-18  Crispin Flowerday  <gnome@flowerday.cx>
 
 	* gnome-settings-xsettings.c: Translate the menus_have_icons
Index: gnome-settings-daemon/gnome-settings-default-editor.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-default-editor.c,v
retrieving revision 1.3
diff -u -r1.3 gnome-settings-default-editor.c
--- gnome-settings-daemon/gnome-settings-default-editor.c	15 Aug 2002 17:54:10 -0000	1.3
+++ gnome-settings-daemon/gnome-settings-default-editor.c	5 Sep 2004 19:04:02 -0000
@@ -92,10 +92,20 @@
 	star_app  = gnome_vfs_mime_get_default_application ("text/*");
 	plain_app = gnome_vfs_mime_get_default_application ("text/plain");
 
-	if (star_app == NULL || plain_app == NULL)
+	if (star_app == NULL || plain_app == NULL) {
+	        if (star_app != NULL) {
+	            gnome_vfs_mime_application_free (star_app);
+	        }
+	        if (plain_app != NULL) {
+	            gnome_vfs_mime_application_free (plain_app);
+	        }
 		return;
-	if (!strcmp (star_app->id, plain_app->id))
+	}
+	if (!strcmp (star_app->id, plain_app->id)) {
+	        gnome_vfs_mime_application_free (star_app);
+	        gnome_vfs_mime_application_free (plain_app);
 		return;
+	}
 
 #if DE_DEBUG
 	g_message ("Synching text/plain to text/*...");
@@ -104,6 +114,8 @@
 	action = gnome_vfs_mime_get_default_action_type ("text/plain");
 
 	gnome_vfs_mime_set_default_application ("text/*", plain_app->id);
+	gnome_vfs_mime_application_free (plain_app);
+
 	gnome_vfs_mime_set_default_action_type ("text/*", action);
 
 	PRINT_STATE;
Index: gnome-settings-daemon/gnome-settings-font.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-font.c,v
retrieving revision 1.6
diff -u -r1.6 gnome-settings-font.c
--- gnome-settings-daemon/gnome-settings-font.c	6 Feb 2003 21:47:00 -0000	1.6
+++ gnome-settings-daemon/gnome-settings-font.c	5 Sep 2004 19:04:03 -0000
@@ -121,8 +121,9 @@
 	{
 	  g_free (link_name);
 	  continue;
-	}
-	  
+	} 
+      g_free (link_name);
+      	  
       if (S_ISLNK (st.st_mode))
 	unlink (link_name);
     }
Index: gnome-settings-daemon/gnome-settings-gtk1theme.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-gtk1theme.c,v
retrieving revision 1.2
diff -u -r1.2 gnome-settings-gtk1theme.c
--- gnome-settings-daemon/gnome-settings-gtk1theme.c	6 Feb 2004 10:53:58 -0000	1.2
+++ gnome-settings-daemon/gnome-settings-gtk1theme.c	5 Sep 2004 19:04:03 -0000
@@ -176,6 +176,7 @@
 		theme_filename = check_filename (g_build_filename (DATADIR, "themes", NULL),
 						 current_theme);
 	}
+	g_free (current_theme);
 
 	/* If we don't find a match, use Raleigh
 	 */
@@ -193,6 +194,7 @@
 	}
 	
 	new_contents = make_contents (theme_filename);
+	g_free (theme_filename);
 	
 	if (!current_contents ||
 	    current_length != strlen (new_contents) ||
Index: gnome-settings-daemon/gnome-settings-keyboard.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-keyboard.c,v
retrieving revision 1.13
diff -u -r1.13 gnome-settings-keyboard.c
--- gnome-settings-daemon/gnome-settings-keyboard.c	30 May 2002 17:38:52 -0000	1.13
+++ gnome-settings-daemon/gnome-settings-keyboard.c	5 Sep 2004 19:04:04 -0000
@@ -86,7 +86,7 @@
 	gboolean repeat, click;
 	int rate, delay;
 	int click_volume, bell_volume, bell_pitch, bell_duration;
-	const char *volume_string;
+	char *volume_string;
 
 	XKeyboardControl kbdcontrol;
 
@@ -105,6 +105,7 @@
 
 	volume_string = gconf_client_get_string (client, "/desktop/gnome/peripherals/keyboard/bell_mode", NULL);
 	bell_volume   = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
+	g_free (volume_string);
 
 	gdk_error_trap_push ();
         if (repeat) {
Index: gnome-settings-daemon/gnome-settings-multimedia-keys.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c,v
retrieving revision 1.6
diff -u -r1.6 gnome-settings-multimedia-keys.c
--- gnome-settings-daemon/gnome-settings-multimedia-keys.c	24 Mar 2004 02:54:32 -0000	1.6
+++ gnome-settings-daemon/gnome-settings-multimedia-keys.c	5 Sep 2004 19:04:09 -0000
@@ -416,7 +416,7 @@
 
 	for (i = 0; i < PLAY_KEY; i++)
 	{
-		const char *tmp;
+		char *tmp;
 		Key *key;
 
 		gconf_client_notify_add (acme->conf_client,
@@ -425,15 +425,19 @@
 
 		tmp = gconf_client_get_string (acme->conf_client,
 				keys[i].gconf_key, NULL);
-		if (is_valid_shortcut (tmp) == FALSE)
+		if (!is_valid_shortcut (tmp)) {
+		        g_free (tmp);
 			continue;
+		}
 
 		key = g_new0 (Key, 1);
-		if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE)
+		if (!egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state))
 		{
+		        g_free (tmp);
 			g_free (key);
 			continue;
 		}
+		g_free (tmp);
 
 		keys[i].key = key;
 
@@ -442,7 +446,7 @@
 
 	for (i = PLAY_KEY; i < HANDLED_KEYS; i++)
 	{
-		const char *tmp;
+		char *tmp;
 		Key *key;
 
 		gconf_client_notify_add (acme->conf_client,
@@ -451,15 +455,19 @@
 
 		tmp = gconf_client_get_string (acme->conf_client,
 				keys[i].gconf_key, NULL);
-		if (is_valid_shortcut (tmp) == FALSE)
+		if (!is_valid_shortcut (tmp)) {
+		        g_free (tmp);
 			continue;
+		}
 
 		key = g_new0 (Key, 1);
 		if (egg_accelerator_parse_virtual (tmp, &key->keysym, &key->keycode, &key->state) == FALSE)
 		{
+		        g_free (tmp);
 			g_free (key);
 			continue;
 		}
+		g_free (tmp);
 
 		keys[i].key = key;
 
Index: gnome-settings-daemon/gnome-settings-xsettings.c
===================================================================
RCS file: /cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-xsettings.c,v
retrieving revision 1.25.2.1
diff -u -r1.25.2.1 gnome-settings-xsettings.c
--- gnome-settings-daemon/gnome-settings-xsettings.c	18 Jun 2004 19:38:17 -0000	1.25.2.1
+++ gnome-settings-daemon/gnome-settings-xsettings.c	5 Sep 2004 19:04:09 -0000
@@ -437,6 +437,8 @@
       else
         {
           process_value (&translations[i], val);
+	  if (val != NULL)
+                  gconf_value_free (val);
         }
       
       ++i;
