[file-roller] fixed memory leak
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] fixed memory leak
- Date: Thu, 16 Apr 2015 19:18:48 +0000 (UTC)
commit ef877bd2dbdde18ea752ed18eed907211dc8bdc2
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Apr 16 21:18:19 2015 +0200
fixed memory leak
src/fr-window.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 323268b..d27e00f 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -4276,19 +4276,16 @@ context_offers_target (GdkDragContext *context,
static gboolean
nautilus_xds_dnd_is_valid_xds_context (GdkDragContext *context)
{
- char *tmp;
- gboolean ret;
+ gboolean ret = FALSE;
g_return_val_if_fail (context != NULL, FALSE);
- tmp = NULL;
if (context_offers_target (context, XDS_ATOM)) {
- tmp = get_xds_atom_value (context);
+ char *tmp = get_xds_atom_value (context);
+ ret = (tmp != NULL);
+ g_free (tmp);
}
- ret = (tmp != NULL);
- g_free (tmp);
-
return ret;
}
@@ -4441,6 +4438,7 @@ fr_window_folder_tree_drag_data_get (GtkWidget *widget,
destination_folder = g_file_get_parent (destination);
g_object_unref (destination);
+ g_free (uri);
/* check whether the extraction can be performed in the destination
* folder */
@@ -4533,6 +4531,8 @@ fr_window_file_list_drag_data_get (FrWindow *window,
g_return_val_if_fail (uri != NULL, FALSE);
destination = g_file_new_for_uri (uri);
+ g_free (uri);
+
if (destination == NULL)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]