summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@src.gnome.org>2003-04-29 17:52:40 +0000
committerKjartan Maraas <kmaraas@src.gnome.org>2003-04-29 17:52:40 +0000
commit60980d0fe5ea2075a082a1f8cfcae4000f325822 (patch)
treea9778ad6cf7664a1ee145275dcc240606efca59b
parente3e9279f0c702ed5a7cff197476faf17f3d95799 (diff)
downloadgnome-control-center-60980d0fe5ea2075a082a1f8cfcae4000f325822.tar.gz
Merge from stable branch
-rw-r--r--capplets/common/ChangeLog7
-rw-r--r--capplets/common/gconf-property-editor.c3
-rw-r--r--capplets/common/gnome-theme-info.c8
-rw-r--r--capplets/file-types/ChangeLog6
-rw-r--r--capplets/file-types/mime-type-info.c4
-rw-r--r--capplets/mouse/ChangeLog5
-rw-r--r--capplets/mouse/gnome-mouse-properties.c4
-rw-r--r--capplets/sound/ChangeLog4
-rw-r--r--capplets/sound/sound-properties-capplet.c3
9 files changed, 35 insertions, 9 deletions
diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog
index 4e37485b1..719fce2d4 100644
--- a/capplets/common/ChangeLog
+++ b/capplets/common/ChangeLog
@@ -1,3 +1,10 @@
+2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
+
+ * gconf-property-editor.c: (gconf_peditor_new): Plug a leak
+ * gnome-theme-info.c: (top_theme_dir_changed),
+ (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor):
+ Plug leaks and fix invalid reads reported by valgrind.
+
2003-03-27 Andrew Sobala <aes@gnome.org>
* gnome-theme-info.c: (gnome_theme_read_meta_theme),
diff --git a/capplets/common/gconf-property-editor.c b/capplets/common/gconf-property-editor.c
index 0d11c069f..95b368689 100644
--- a/capplets/common/gconf-property-editor.c
+++ b/capplets/common/gconf-property-editor.c
@@ -374,7 +374,8 @@ gconf_peditor_new (gchar *key,
GCONF_PROPERTY_EDITOR (obj)->p->callback (client, 0, gconf_entry, obj);
GCONF_PROPERTY_EDITOR (obj)->p->inited = TRUE;
gconf_entry_free (gconf_entry);
-
+ g_object_unref (G_OBJECT (client));
+
return obj;
}
diff --git a/capplets/common/gnome-theme-info.c b/capplets/common/gnome-theme-info.c
index aa57b85c0..80827d84b 100644
--- a/capplets/common/gnome-theme-info.c
+++ b/capplets/common/gnome-theme-info.c
@@ -936,7 +936,7 @@ top_theme_dir_changed (GnomeVFSMonitorHandle *handle,
if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
{
add_common_theme_dir_monitor (common_theme_dir_uri, NULL, monitor_data, NULL);
- g_hash_table_insert (handle_hash, file_info->name, monitor_data);
+ g_hash_table_insert (handle_hash, g_strdup(file_info->name), monitor_data);
}
gnome_vfs_file_info_unref (file_info);
}
@@ -988,7 +988,7 @@ top_icon_theme_dir_changed (GnomeVFSMonitorHandle *handle,
if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
{
add_common_icon_theme_dir_monitor (common_icon_theme_dir_uri, NULL, monitor_data, NULL);
- g_hash_table_insert (handle_hash, file_info->name, monitor_data);
+ g_hash_table_insert (handle_hash, g_strdup(file_info->name), monitor_data);
}
gnome_vfs_file_info_unref (file_info);
}
@@ -1187,7 +1187,7 @@ real_add_top_theme_dir_monitor (GnomeVFSURI *uri,
* use it to remove the monitor handles when a dir is removed.
*/
tuple = g_new0 (CallbackTuple, 1);
- tuple->handle_hash = g_hash_table_new (g_str_hash, g_str_equal);
+ tuple->handle_hash = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, NULL);
tuple->priority = priority;
/* Check the URI */
@@ -1251,7 +1251,7 @@ real_add_top_theme_dir_monitor (GnomeVFSURI *uri,
}
- g_hash_table_insert (tuple->handle_hash, file_info->name, monitor_data);
+ g_hash_table_insert (tuple->handle_hash, g_strdup(file_info->name), monitor_data);
gnome_vfs_file_info_clear (file_info);
gnome_vfs_uri_unref (theme_dir_uri);
}
diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog
index 815810c6a..e369a1fda 100644
--- a/capplets/file-types/ChangeLog
+++ b/capplets/file-types/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-29 Kjartan Maraas <set EMAIL_ADDRESS environment variable>
+
+ * mime-type-info.c: (mime_category_info_get_full_name),
+ (mime_category_info_get_full_description): Use g_string_new (NULL)
+ instead of g_string_new (""). Reported to be more efficient.
+
Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
* Release 2.2.0.1
diff --git a/capplets/file-types/mime-type-info.c b/capplets/file-types/mime-type-info.c
index 6261f720f..158bf99b1 100644
--- a/capplets/file-types/mime-type-info.c
+++ b/capplets/file-types/mime-type-info.c
@@ -528,7 +528,7 @@ mime_category_info_get_full_name (MimeCategoryInfo *info)
ModelEntry *tmp;
gchar *ret, *s;
- string = g_string_new ("");
+ string = g_string_new (NULL);
for (tmp = MODEL_ENTRY (info); tmp != NULL && tmp->type != MODEL_ENTRY_NONE; tmp = tmp->parent) {
g_string_prepend (string, MIME_CATEGORY_INFO (tmp)->name);
@@ -550,7 +550,7 @@ mime_category_info_get_full_description (MimeCategoryInfo *info)
ModelEntry *tmp;
gchar *ret, *s;
- string = g_string_new ("");
+ string = g_string_new (NULL);
for (tmp = MODEL_ENTRY (info); tmp != NULL && tmp->type != MODEL_ENTRY_NONE; tmp = tmp->parent) {
g_string_prepend (string, MIME_CATEGORY_INFO (tmp)->description);
diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog
index 81f2877f4..552843cbb 100644
--- a/capplets/mouse/ChangeLog
+++ b/capplets/mouse/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
+
+ * gnome-mouse-properties.c: (read_cursor_font), (setup_dialog):
+ Plug a couple of leaks.
+
Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
* Release 2.2.0.1
diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c
index 0751c9b85..e157719a8 100644
--- a/capplets/mouse/gnome-mouse-properties.c
+++ b/capplets/mouse/gnome-mouse-properties.c
@@ -385,6 +385,7 @@ read_cursor_font (void)
target[length] = '\0';
retval = g_strdup (target);
g_free (link_name);
+ closedir (dir);
return retval;
}
@@ -612,7 +613,8 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
COLUMN_FONT_PATH, font_path,
-1);
g_free (font_path);
-
+ g_free (cursor_font);
+
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
gconf_peditor_new_boolean
diff --git a/capplets/sound/ChangeLog b/capplets/sound/ChangeLog
index aa175cbed..90e163a6e 100644
--- a/capplets/sound/ChangeLog
+++ b/capplets/sound/ChangeLog
@@ -1,3 +1,7 @@
+2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
+
+ * sound-properties-capplet.c: (main): Plug a leak.
+
Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
* Release 2.2.0.1
diff --git a/capplets/sound/sound-properties-capplet.c b/capplets/sound/sound-properties-capplet.c
index 32e3ef4c0..28984d0b2 100644
--- a/capplets/sound/sound-properties-capplet.c
+++ b/capplets/sound/sound-properties-capplet.c
@@ -189,6 +189,7 @@ main (int argc, char **argv)
gtk_main ();
gconf_change_set_unref (changeset);
}
-
+
+ g_object_unref (dialog);
return 0;
}