From 1ebe0a852bfdd245888ba58d788a36716f778f72 Mon Sep 17 00:00:00 2001 From: Alexandru Pandelea Date: Thu, 29 Sep 2016 22:05:58 +0300 Subject: batch-rename: Fix memory leaks Fix memory leaks for batch renaming. https://bugzilla.gnome.org/show_bug.cgi?id=771490 --- src/nautilus-batch-rename-dialog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/nautilus-batch-rename-dialog.c') 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) { -- cgit v1.2.1