summaryrefslogtreecommitdiff
path: root/src/nautilus-batch-rename-dialog.c
diff options
context:
space:
mode:
authorAlexandru Pandelea <alexandru.pandelea@gmail.com>2016-09-29 22:05:58 +0300
committerCarlos Soriano <csoriano@gnome.org>2016-10-05 11:09:29 +0200
commit1ebe0a852bfdd245888ba58d788a36716f778f72 (patch)
tree0009e6901407207871496740258c078be312c464 /src/nautilus-batch-rename-dialog.c
parent24dae9e0a429d25b3871e5a3d4710369d7cac0b9 (diff)
downloadnautilus-1ebe0a852bfdd245888ba58d788a36716f778f72.tar.gz
batch-rename: Fix memory leaks
Fix memory leaks for batch renaming. https://bugzilla.gnome.org/show_bug.cgi?id=771490
Diffstat (limited to 'src/nautilus-batch-rename-dialog.c')
-rw-r--r--src/nautilus-batch-rename-dialog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index 170919f19..6acccaac6 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -405,6 +405,10 @@ split_entry_text (NautilusBatchRenameDialog *self,
{
result = g_list_prepend (result, normal_text);
}
+ else
+ {
+ g_string_free (normal_text, TRUE);
+ }
result = g_list_reverse (result);
@@ -868,6 +872,7 @@ select_nth_conflict (NautilusBatchRenameDialog *dialog)
display_text->str);
g_string_free (conflict_file_name, TRUE);
+ g_string_free (display_text, TRUE);
}
static void
@@ -1181,7 +1186,7 @@ check_conflict_for_files (NautilusBatchRenameDialog *dialog,
if (!have_conflict)
{
tag_present = g_hash_table_lookup (names_conflicts_table, new_name->str) != NULL;
- same_parent_directory = g_strcmp0 (nautilus_file_get_parent_uri (file), current_directory) == 0;
+ same_parent_directory = g_strcmp0 (parent_uri, current_directory) == 0;
if (tag_present && same_parent_directory)
{