[nautilus] file: fix invalid memory access
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file: fix invalid memory access
- Date: Sat, 24 Jun 2017 17:25:33 +0000 (UTC)
commit 68cfc994f9da5dab723f5cdd2daecc893c342f40
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date: Sat Jun 17 11:39:55 2017 +0300
file: fix invalid memory access
When the operation is freed on the first if, the operation will
still be accessed on the second if.
To fix this, merge the two if's since they both complete the
operation.
https://bugzilla.gnome.org/show_bug.cgi?id=783873
src/nautilus-file.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 55c44aa..daa4009 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -2287,12 +2287,8 @@ batch_rename_get_info_callback (GObject *source_object,
op->renamed_files++;
- if (op->renamed_files + op->skipped_files == g_list_length (op->files))
- {
- nautilus_file_operation_complete (op, NULL, error);
- }
-
- if (op->files == NULL)
+ if (op->files == NULL ||
+ op->renamed_files + op->skipped_files == g_list_length (op->files))
{
nautilus_file_operation_complete (op, NULL, error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]