From 4212fb28abe7e972d0f7b657b3fbde054a1b9a17 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 21 Sep 2008 04:38:24 +0000 Subject: [PATCH] plug memory leaks --- description-leak.patch | 16 ++++++++++++++++ filesystem-id-cmp.patch | 12 ++++++++++++ nautilus-leaks.patch | 23 +++++++++++++++++++++++ nautilus.spec | 21 +++++++++++++++++++-- 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 description-leak.patch create mode 100644 filesystem-id-cmp.patch create mode 100644 nautilus-leaks.patch diff --git a/description-leak.patch b/description-leak.patch new file mode 100644 index 0000000..25ce04d --- /dev/null +++ b/description-leak.patch @@ -0,0 +1,16 @@ +diff -up nautilus-2.23.92/libnautilus-private/nautilus-open-with-dialog.c.description-leak nautilus-2.23.92/libnautilus-private/nautilus-open-with-dialog.c +--- nautilus-2.23.92/libnautilus-private/nautilus-open-with-dialog.c.description-leak 2008-09-20 23:57:57.000000000 -0400 ++++ nautilus-2.23.92/libnautilus-private/nautilus-open-with-dialog.c 2008-09-20 23:58:29.000000000 -0400 +@@ -907,10 +907,10 @@ set_uri_and_type (NautilusOpenWithDialog + description = g_content_type_get_description (mime_type); + + if (description == NULL) { +- description = _("Unknown"); ++ description = g_strdup (_("Unknown")); + } + +- dialog->details->type_description = g_strdup (description); ++ dialog->details->type_description = description; + } + g_free (extension); + diff --git a/filesystem-id-cmp.patch b/filesystem-id-cmp.patch new file mode 100644 index 0000000..8138fd1 --- /dev/null +++ b/filesystem-id-cmp.patch @@ -0,0 +1,12 @@ +diff -up nautilus-2.23.92/libnautilus-private/nautilus-file.c.filesystem-id-cmp nautilus-2.23.92/libnautilus-private/nautilus-file.c +--- nautilus-2.23.92/libnautilus-private/nautilus-file.c.filesystem-id-cmp 2008-09-20 20:52:38.000000000 -0400 ++++ nautilus-2.23.92/libnautilus-private/nautilus-file.c 2008-09-20 20:53:20.000000000 -0400 +@@ -1836,7 +1836,7 @@ update_info_internal (NautilusFile *file + } + + filesystem_id = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_ID_FILESYSTEM); +- if (eel_strcmp (file->details->filesystem_id, filesystem_id) != 0) { ++ if (eel_strcmp (eel_ref_str_peek (file->details->filesystem_id), filesystem_id) != 0) { + changed = TRUE; + eel_ref_str_unref (file->details->filesystem_id); + file->details->filesystem_id = eel_ref_str_get_unique (filesystem_id); diff --git a/nautilus-leaks.patch b/nautilus-leaks.patch new file mode 100644 index 0000000..e05a5ab --- /dev/null +++ b/nautilus-leaks.patch @@ -0,0 +1,23 @@ +1eaa3d102a9df49cf41fe46fc01e88f8c1382c51 +diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c +index 2c9ab69..4f9002f 100644 +--- a/libnautilus-private/nautilus-file.c ++++ b/libnautilus-private/nautilus-file.c +@@ -691,6 +691,7 @@ finalize (GObject *object) + + eel_g_list_free_deep (file->details->pending_extension_emblems); + eel_g_list_free_deep (file->details->extension_emblems); ++ eel_g_object_list_free (file->details->pending_info_providers); + + if (file->details->pending_extension_attributes) { + g_hash_table_destroy (file->details->pending_extension_attributes); +@@ -6530,6 +6531,9 @@ invalidate_thumbnail (NautilusFile *file) + void + nautilus_file_invalidate_extension_info_internal (NautilusFile *file) + { ++ if (file->details->pending_info_providers) ++ eel_g_object_list_free (file->details->pending_info_providers); ++ + file->details->pending_info_providers = + nautilus_module_get_extensions_for_type (NAUTILUS_TYPE_INFO_PROVIDER); + } diff --git a/nautilus.spec b/nautilus.spec index 75de45e..f058658 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -19,7 +19,7 @@ Name: nautilus Summary: Nautilus is a file manager for GNOME Version: 2.23.92 -Release: 1%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: User Interface/Desktops Source: http://download.gnome.org/sources/%{name}/2.23/%{name}-%{version}.tar.bz2 @@ -99,6 +99,13 @@ Patch15: nautilus-2.22.0-treeview-xds-dnd.patch # http://bugzilla.gnome.org/show_bug.cgi?id=519743 Patch17: nautilus-filetype-symlink-fix.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=552310 +Patch22: nautilus-leaks.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=553073 +Patch23: filesystem-id-cmp.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=553084 +Patch24: description-leak.patch + %description Nautilus integrates access to files, applications, media, Internet-based resources and the Web. Nautilus delivers a dynamic and @@ -137,6 +144,9 @@ for writing nautilus extensions. %patch10 -p0 -b .gvfs-desktop-key %patch15 -p1 -b .xds %patch17 -p0 -b .symlink +%patch22 -p1 -b .leaks +%patch23 -p1 -b .filesystem-id-cmp +%patch24 -p1 -b .description-leak %build @@ -144,7 +154,8 @@ libtoolize --force --copy aclocal autoconf -CFLAGS="$RPM_OPT_FLAGS -g -DUGLY_HACK_TO_DETECT_KDE -DNAUTILUS_OMIT_SELF_CHECK" %configure --disable-more-warnings --disable-update-mimedb +#CFLAGS="$RPM_OPT_FLAGS -g -DUGLY_HACK_TO_DETECT_KDE -DNAUTILUS_OMIT_SELF_CHECK" %configure --disable-more-warnings --disable-update-mimedb +CFLAGS="-O0 -g -DUGLY_HACK_TO_DETECT_KDE -DNAUTILUS_OMIT_SELF_CHECK" %configure --disable-more-warnings --disable-update-mimedb export tagname=CC LANG=en_US make LIBTOOL=/usr/bin/libtool %{?_smp_mflags} @@ -255,6 +266,12 @@ fi %changelog +* Sat Sep 20 2008 Matthias Clasen - 2.23.92-3 +- Plug some memory leaks + +* Fri Sep 19 2008 Matthias Clasen - 2.23.92-2 +- Plug some memory leaks + * Mon Sep 8 2008 Matthias Clasen - 2.23.92-1 - Update to 2.23.92