Patch for more leakage
- From: Martin Wehner <martin wehner epost de>
- To: Nautilus List <nautilus-list gnome org>
- Subject: Patch for more leakage
- Date: Wed, 22 Oct 2003 18:52:03 +0200
Hi,
this patch fixes three more small memory leaks.
Martin
Index: components/tree/nautilus-tree-model.c
===================================================================
RCS file: /cvs/gnome/nautilus/components/tree/nautilus-tree-model.c,v
retrieving revision 1.79
diff -p -u -r1.79 nautilus-tree-model.c
--- components/tree/nautilus-tree-model.c 27 Jun 2003 16:35:32 -0000 1.79
+++ components/tree/nautilus-tree-model.c 22 Oct 2003 16:36:01 -0000
@@ -202,6 +202,7 @@ tree_node_destroy (NautilusTreeModel *mo
g_object_unref (node->file);
g_free (node->display_name);
+ g_free (node->icon_name);
object_unref_if_not_NULL (node->closed_pixbuf);
object_unref_if_not_NULL (node->open_pixbuf);
Index: libnautilus-private/nautilus-icon-dnd.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-dnd.c,v
retrieving revision 1.132
diff -p -u -r1.132 nautilus-icon-dnd.c
--- libnautilus-private/nautilus-icon-dnd.c 15 May 2003 17:18:43 -0000 1.132
+++ libnautilus-private/nautilus-icon-dnd.c 22 Oct 2003 16:36:07 -0000
@@ -1137,6 +1137,7 @@ nautilus_icon_dnd_update_drop_target (Na
NautilusIcon *icon;
NautilusFile *file;
double world_x, world_y;
+ char *uri;
g_assert (NAUTILUS_IS_ICON_CONTAINER (container));
if ((container->details->dnd_info->drag_info.selection_list == NULL)
@@ -1157,8 +1158,10 @@ nautilus_icon_dnd_update_drop_target (Na
/* Find if target icon accepts our drop. */
if (icon != NULL && (container->details->dnd_info->drag_info.data_type != NAUTILUS_ICON_DND_KEYWORD)) {
- file = nautilus_file_get (nautilus_icon_container_get_icon_uri (container, icon));
-
+ uri = nautilus_icon_container_get_icon_uri (container, icon);
+ file = nautilus_file_get (uri);
+ g_free (uri);
+
if (!nautilus_drag_can_accept_items (file,
container->details->dnd_info->drag_info.selection_list)) {
icon = NULL;
Index: src/file-manager/fm-properties-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.c,v
retrieving revision 1.181
diff -p -u -r1.181 fm-properties-window.c
--- src/file-manager/fm-properties-window.c 19 Sep 2003 09:10:06 -0000 1.181
+++ src/file-manager/fm-properties-window.c 22 Oct 2003 16:36:18 -0000
@@ -3624,12 +3624,13 @@ fm_properties_window_present (GList *ori
directory_view);
nautilus_file_list_free (target_files);
+ g_free(pending_key);
/* Wait until we can tell whether it's a directory before showing, since
* some one-time layout decisions depend on that info.
*/
- g_hash_table_insert (pending_lists, pending_key, pending_key);
+ g_hash_table_insert (pending_lists, startup_data->pending_key, startup_data->pending_key);
g_signal_connect (directory_view, "destroy",
G_CALLBACK (directory_view_destroyed_callback), startup_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]