Commit a3cc3425 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Fix leaks. Patch from Martin Wehner <martin.wehner@epost.de>

2003-10-21  Alexander Larsson  <alexl@redhat.com>

	* libnautilus-private/nautilus-desktop-link.c:
	* libnautilus-private/nautilus-file-operations.c:
	* libnautilus-private/nautilus-file.c:
	* libnautilus-private/nautilus-icon-factory.c:
	* src/nautilus-application.c:
	* src/nautilus-bookmark-list.c:
	Fix leaks.
	Patch from Martin Wehner <martin.wehner@epost.de>
parent 36a6eaa2
2003-10-21 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-desktop-link.c:
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file.c:
* libnautilus-private/nautilus-icon-factory.c:
* src/nautilus-application.c:
* src/nautilus-bookmark-list.c:
Fix leaks.
Patch from Martin Wehner <martin.wehner@epost.de>
Mon Oct 20 13:38:16 2003 Jonathan Blandford <jrb@gnome.org> Mon Oct 20 13:38:16 2003 Jonathan Blandford <jrb@gnome.org>
* src/Makefile.am (INCLUDES): remove GTK and * src/Makefile.am (INCLUDES): remove GTK and
......
...@@ -367,6 +367,14 @@ desktop_link_finalize (GObject *object) ...@@ -367,6 +367,14 @@ desktop_link_finalize (GObject *object)
link); link);
} }
if (link->details->type == NAUTILUS_DESKTOP_LINK_VOLUME) {
g_free (link->details->mount_path);
}
g_free (link->details->filename);
g_free (link->details->display_name);
g_free (link->details->activation_uri);
g_free (link->details->icon);
g_free (link->details); g_free (link->details);
EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
......
...@@ -1054,7 +1054,8 @@ handle_transfer_overwrite (const GnomeVFSXferProgressInfo *progress_info, ...@@ -1054,7 +1054,8 @@ handle_transfer_overwrite (const GnomeVFSXferProgressInfo *progress_info,
(parent_for_error_dialog (transfer_info), TRUE, text, (parent_for_error_dialog (transfer_info), TRUE, text,
_("Conflict while copying"), _("Conflict while copying"),
_("Replace"), _("Skip"), NULL); _("Replace"), _("Skip"), NULL);
g_free (text);
nautilus_file_operations_progress_resume_timeout (transfer_info->progress_dialog); nautilus_file_operations_progress_resume_timeout (transfer_info->progress_dialog);
switch (result) { switch (result) {
...@@ -1071,6 +1072,7 @@ handle_transfer_overwrite (const GnomeVFSXferProgressInfo *progress_info, ...@@ -1071,6 +1072,7 @@ handle_transfer_overwrite (const GnomeVFSXferProgressInfo *progress_info,
(parent_for_error_dialog (transfer_info), TRUE, text, (parent_for_error_dialog (transfer_info), TRUE, text,
_("Conflict while copying"), _("Conflict while copying"),
_("Replace All"), _("Replace"), _("Skip"), NULL); _("Replace All"), _("Replace"), _("Skip"), NULL);
g_free (text);
nautilus_file_operations_progress_resume_timeout (transfer_info->progress_dialog); nautilus_file_operations_progress_resume_timeout (transfer_info->progress_dialog);
......
...@@ -1022,6 +1022,7 @@ rename_guts (NautilusFile *file, ...@@ -1022,6 +1022,7 @@ rename_guts (NautilusFile *file,
* But not for .desktop files as '/' are allowed for them */ * But not for .desktop files as '/' are allowed for them */
if (strstr (new_name, "/") != NULL && !is_local_desktop_file) { if (strstr (new_name, "/") != NULL && !is_local_desktop_file) {
(* callback) (file, GNOME_VFS_ERROR_NOT_PERMITTED, callback_data); (* callback) (file, GNOME_VFS_ERROR_NOT_PERMITTED, callback_data);
g_free (uri);
return; return;
} }
...@@ -1037,6 +1038,7 @@ rename_guts (NautilusFile *file, ...@@ -1037,6 +1038,7 @@ rename_guts (NautilusFile *file,
*/ */
nautilus_file_changed (file); nautilus_file_changed (file);
(* callback) (file, GNOME_VFS_ERROR_NOT_FOUND, callback_data); (* callback) (file, GNOME_VFS_ERROR_NOT_FOUND, callback_data);
g_free (uri);
return; return;
} }
...@@ -1046,6 +1048,7 @@ rename_guts (NautilusFile *file, ...@@ -1046,6 +1048,7 @@ rename_guts (NautilusFile *file,
*/ */
if (name_is (file, new_name)) { if (name_is (file, new_name)) {
(* callback) (file, GNOME_VFS_OK, callback_data); (* callback) (file, GNOME_VFS_OK, callback_data);
g_free (uri);
return; return;
} }
...@@ -1060,6 +1063,7 @@ rename_guts (NautilusFile *file, ...@@ -1060,6 +1063,7 @@ rename_guts (NautilusFile *file,
*/ */
nautilus_file_changed (file); nautilus_file_changed (file);
(* callback) (file, GNOME_VFS_ERROR_NOT_SUPPORTED, callback_data); (* callback) (file, GNOME_VFS_ERROR_NOT_SUPPORTED, callback_data);
g_free (uri);
return; return;
} }
...@@ -1068,7 +1072,7 @@ rename_guts (NautilusFile *file, ...@@ -1068,7 +1072,7 @@ rename_guts (NautilusFile *file,
NautilusDesktopLink *link; NautilusDesktopLink *link;
link = nautilus_desktop_icon_file_get_link (NAUTILUS_DESKTOP_ICON_FILE (file)); link = nautilus_desktop_icon_file_get_link (NAUTILUS_DESKTOP_ICON_FILE (file));
if (nautilus_desktop_link_rename (link, new_name)) { if (nautilus_desktop_link_rename (link, new_name)) {
(* callback) (file, GNOME_VFS_OK, callback_data); (* callback) (file, GNOME_VFS_OK, callback_data);
} else { } else {
...@@ -1076,6 +1080,7 @@ rename_guts (NautilusFile *file, ...@@ -1076,6 +1080,7 @@ rename_guts (NautilusFile *file,
} }
g_object_unref (link); g_object_unref (link);
g_free (uri);
return; return;
} }
......
...@@ -393,6 +393,7 @@ static void ...@@ -393,6 +393,7 @@ static void
cache_key_destroy (CacheKey *key) cache_key_destroy (CacheKey *key)
{ {
g_free (key->name); g_free (key->name);
g_free (key->modifier);
g_free (key); g_free (key);
} }
......
...@@ -331,6 +331,7 @@ migrate_old_nautilus_files (void) ...@@ -331,6 +331,7 @@ migrate_old_nautilus_files (void)
_("Migrated old desktop"), _("Migrated old desktop"),
NULL); NULL);
} }
g_free (old_desktop_dir);
g_free (migrated_file); g_free (migrated_file);
} }
......
...@@ -147,6 +147,7 @@ append_bookmark_node (gpointer data, gpointer user_data) ...@@ -147,6 +147,7 @@ append_bookmark_node (gpointer data, gpointer user_data)
if (icon != NULL) { if (icon != NULL) {
/* Don't bother storing modifier or embedded text for bookmarks. */ /* Don't bother storing modifier or embedded text for bookmarks. */
xmlSetProp (bookmark_node, "icon_name", icon); xmlSetProp (bookmark_node, "icon_name", icon);
g_free (icon);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment