summaryrefslogtreecommitdiff
path: root/libnautilus-private
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2008-05-08 22:54:59 +0000
committerCosimo Cecchi <cosimoc@src.gnome.org>2008-05-08 22:54:59 +0000
commit0b7f46380552e5448735cc931f66ec226876321e (patch)
tree7ebbf687a8f65f2c934095de9a1a312fa900b56e /libnautilus-private
parent0e85321fb6dcc0043d414d398932900121dd1f2b (diff)
downloadnautilus-0b7f46380552e5448735cc931f66ec226876321e.tar.gz
Plugged some leaks around. Cleaned up this bit of code.
2008-05-09 Cosimo Cecchi <cosimoc@gnome.org> * libnautilus-private/nautilus-dnd.c: (nautilus_drag_file_local_internal), (nautilus_drag_drag_data_get): * libnautilus-private/nautilus-open-with-dialog.c: (add_or_find_application): * libnautilus-private/nautilus-program-choosing.c: (nautilus_launch_application): * src/nautilus-sidebar-title.c: (update_icon): * src/nautilus-spatial-window.c: (got_file_info_for_location_menu_callback): * libnautilus-private/nautilus-file.c: (get_custom_icon): Plugged some leaks around. * libnautilus-private/nautilus-file.c: (is_uri_relative): Cleaned up this bit of code. Bug #532126. svn path=/trunk/; revision=14149
Diffstat (limited to 'libnautilus-private')
-rw-r--r--libnautilus-private/nautilus-dnd.c3
-rw-r--r--libnautilus-private/nautilus-file.c5
-rw-r--r--libnautilus-private/nautilus-open-with-dialog.c1
-rw-r--r--libnautilus-private/nautilus-program-choosing.c1
4 files changed, 9 insertions, 1 deletions
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 97a502ff9..8af9eee10 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -228,6 +228,8 @@ nautilus_drag_file_local_internal (const char *target_uri_string,
g_object_unref (parent);
}
+ g_object_unref (target);
+
return result;
}
@@ -586,6 +588,7 @@ nautilus_drag_drag_data_get (GtkWidget *widget,
gtk_selection_data_set (selection_data,
selection_data->target,
8, result->str, result->len);
+ g_string_free (result, TRUE);
return TRUE;
}
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index c19cf0635..71dd9047c 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -3146,10 +3146,12 @@ static gboolean
is_uri_relative (const char *uri)
{
char *scheme;
+ gboolean ret;
scheme = g_uri_parse_scheme (uri);
+ ret = (scheme == NULL);
g_free (scheme);
- return scheme == NULL;
+ return ret;
}
static char *
@@ -3193,6 +3195,7 @@ get_custom_icon (NautilusFile *file)
icon_file = g_file_new_for_uri (custom_icon_uri);
icon = g_file_icon_new (icon_file);
g_object_unref (icon_file);
+ g_free (custom_icon_uri);
}
if (icon == NULL && file->details->got_link_info && file->details->custom_icon != NULL) {
diff --git a/libnautilus-private/nautilus-open-with-dialog.c b/libnautilus-private/nautilus-open-with-dialog.c
index 8adeaf748..a15e0f9af 100644
--- a/libnautilus-private/nautilus-open-with-dialog.c
+++ b/libnautilus-private/nautilus-open-with-dialog.c
@@ -243,6 +243,7 @@ add_or_find_application (NautilusOpenWithDialog *dialog)
app_name,
G_APP_INFO_CREATE_NONE,
&error);
+ g_free (app_name);
}
}
diff --git a/libnautilus-private/nautilus-program-choosing.c b/libnautilus-private/nautilus-program-choosing.c
index 4b3e47d62..2151b8363 100644
--- a/libnautilus-private/nautilus-program-choosing.c
+++ b/libnautilus-private/nautilus-program-choosing.c
@@ -206,6 +206,7 @@ nautilus_launch_application (GAppInfo *application,
g_warning ("Cannot open app: %s\n", error->message);
#endif
}
+ g_error_free (error);
} else {
for (l = files; l != NULL; l = l->next) {
file = NAUTILUS_FILE (l->data);