From 68cfc994f9da5dab723f5cdd2daecc893c342f40 Mon Sep 17 00:00:00 2001 From: Alexandru Pandelea Date: Sat, 17 Jun 2017 11:39:55 +0300 Subject: 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 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/nautilus-file.c b/src/nautilus-file.c index 55c44aa64..daa4009dd 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); } -- cgit v1.2.1