From 3fa4c01bcf7ab207216099640b2c05452200dab2 Mon Sep 17 00:00:00 2001 From: Ell Date: Sun, 27 May 2018 13:53:02 -0400 Subject: [PATCH] app: fix gimp_parallel_run_async() cancelation In gimp_parallel_run_async(), when aborting a GimpAsync operation in reponse to its "cancel" signal, properly clean up internal data attached to the object, to avoid use-after-free if the signal is emitted again. --- app/core/gimp-parallel.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/core/gimp-parallel.cc b/app/core/gimp-parallel.cc index c029553363..424d20ec73 100644 --- a/app/core/gimp-parallel.cc +++ b/app/core/gimp-parallel.cc @@ -489,6 +489,9 @@ gimp_parallel_run_async_cancel (GimpAsync *async) if (link) { + g_object_set_data (G_OBJECT (async), + "gimp-parallel-run-async-link", NULL); + g_slice_free (GimpParallelRunAsyncTask, link->data); g_queue_delete_link (&gimp_parallel_run_async_queue, link);