summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Camp <dave@ximian.com>2002-08-12 20:01:54 +0000
committerDave Camp <campd@src.gnome.org>2002-08-12 20:01:54 +0000
commit0459d0d0c70e64a478b44a33d88899d17af183a7 (patch)
treef950442a373348d3c27ba874d981b7a3515a0377
parent1144bec381917e1752823ee153abfc2f7d9841ba (diff)
downloadnautilus-0459d0d0c70e64a478b44a33d88899d17af183a7.tar.gz
Unref target_uri before returning when eel_uri_is_trash
2002-08-12 Dave Camp <dave@ximian.com> * libnautilus-private/nautilus-dnd.c: (nautilus_drag_default_drop_action_for_icons): Unref target_uri before returning when eel_uri_is_trash (target_uri_string). * libnautilus-private/nautilus-file-operations.c: (append_basename): Free the filename returned from gnome_vfs_uri_etract_short_name(). * libnautilus-private/nautilus-theme.c: (attributes_free): Free the attributes struct. * libnautilus-private/nautilus-undo-manager.c: (finalize): Free the details struct. * src/nautilus-bookmark-list.c: (append_bookmark_node): Free the mime type string.
-rw-r--r--ChangeLog15
-rw-r--r--libnautilus-private/nautilus-dnd.c5
-rw-r--r--libnautilus-private/nautilus-file-operations.c8
-rw-r--r--libnautilus-private/nautilus-theme.c2
-rw-r--r--libnautilus-private/nautilus-undo-manager.c2
-rw-r--r--src/nautilus-bookmark-list.c1
6 files changed, 31 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 80241fefc..e81cc16b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2002-08-12 Dave Camp <dave@ximian.com>
+
+ * libnautilus-private/nautilus-dnd.c:
+ (nautilus_drag_default_drop_action_for_icons): Unref target_uri
+ before returning when eel_uri_is_trash (target_uri_string).
+ * libnautilus-private/nautilus-file-operations.c:
+ (append_basename): Free the filename returned from
+ gnome_vfs_uri_etract_short_name().
+ * libnautilus-private/nautilus-theme.c: (attributes_free): Free
+ the attributes struct.
+ * libnautilus-private/nautilus-undo-manager.c: (finalize): Free
+ the details struct.
+ * src/nautilus-bookmark-list.c: (append_bookmark_node): Free the
+ mime type string.
+
2002-08-12 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file.c (rename_guts):
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 999492495..0e88b2f8d 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -295,6 +295,11 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
if (actions & GDK_ACTION_MOVE) {
*action = GDK_ACTION_MOVE;
}
+
+ if (target_uri) {
+ gnome_vfs_uri_unref (target_uri);
+ }
+
return;
} else if (eel_str_has_prefix (target_uri_string, NAUTILUS_COMMAND_SPECIFIER)
diff --git a/libnautilus-private/nautilus-file-operations.c b/libnautilus-private/nautilus-file-operations.c
index 3ca40d03a..8e8e9a70a 100644
--- a/libnautilus-private/nautilus-file-operations.c
+++ b/libnautilus-private/nautilus-file-operations.c
@@ -1645,11 +1645,15 @@ static GnomeVFSURI *
append_basename (const GnomeVFSURI *target_directory,
const GnomeVFSURI *source_directory)
{
- const char *file_name;
+ char *file_name;
+ GnomeVFSURI *ret;
file_name = gnome_vfs_uri_extract_short_name (source_directory);
if (file_name != NULL) {
- return gnome_vfs_uri_append_file_name (target_directory, file_name);
+ ret = gnome_vfs_uri_append_file_name (target_directory,
+ file_name);
+ g_free (file_name);
+ return ret;
}
return gnome_vfs_uri_dup (target_directory);
diff --git a/libnautilus-private/nautilus-theme.c b/libnautilus-private/nautilus-theme.c
index 13f0a7674..816a8fa50 100644
--- a/libnautilus-private/nautilus-theme.c
+++ b/libnautilus-private/nautilus-theme.c
@@ -654,6 +654,8 @@ attributes_free (gpointer data,
if (attributes->preview_pixbuf != NULL) {
g_object_unref (attributes->preview_pixbuf);
}
+
+ g_free (attributes);
}
void
diff --git a/libnautilus-private/nautilus-undo-manager.c b/libnautilus-private/nautilus-undo-manager.c
index 636297eef..0d17a0ed4 100644
--- a/libnautilus-private/nautilus-undo-manager.c
+++ b/libnautilus-private/nautilus-undo-manager.c
@@ -209,6 +209,8 @@ finalize (GObject *object)
manager = NAUTILUS_UNDO_MANAGER (object);
release_transaction (manager);
+
+ g_free (manager->details);
EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c
index 78d27dadf..95de6ce51 100644
--- a/src/nautilus-bookmark-list.c
+++ b/src/nautilus-bookmark-list.c
@@ -154,6 +154,7 @@ append_bookmark_node (gpointer data, gpointer user_data)
xmlSetProp (bookmark_node, "icon_name", icon_name);
nautilus_scalable_icon_unref (icon);
g_free (icon_uri);
+ g_free (icon_mime_type);
g_free (icon_name);
}
}