summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2017-05-15 11:27:12 +0300
committerErnestas Kulik <ernestask@gnome.org>2017-05-15 15:06:24 +0300
commit8a14b5329c8b5b104caa80a70b0aa038adbee5ee (patch)
tree9cf37cfe39db4b5d292b329d32924eeb3506dba1
parent7b7f0a1b637f6e92b48672db452f72fed8154ce9 (diff)
downloadnautilus-8a14b5329c8b5b104caa80a70b0aa038adbee5ee.tar.gz
file-operations: duplicate: use automatic cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=782650
-rw-r--r--src/nautilus-file-operations.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index bc2996cf3..366da412f 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -6928,9 +6928,9 @@ nautilus_file_operations_duplicate (GList *files,
NautilusCopyCallback done_callback,
gpointer done_callback_data)
{
- GTask *task;
+ g_autoptr (GTask) task = NULL;
CopyMoveJob *job;
- GFile *parent;
+ g_autoptr (GFile) parent = NULL;
job = op_job_new (CopyMoveJob, parent_window);
job->done_callback = done_callback;
@@ -6968,9 +6968,6 @@ nautilus_file_operations_duplicate (GList *files,
task = g_task_new (NULL, job->common.cancellable, copy_task_done, job);
g_task_set_task_data (task, job, NULL);
g_task_run_in_thread (task, copy_task_thread_func);
- g_object_unref (task);
-
- g_object_unref (parent);
}
static void