[gimp/gimp-2-10] app: fix gimp_parallel_run_async() cancelation
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: fix gimp_parallel_run_async() cancelation
- Date: Sun, 27 May 2018 18:01:01 +0000 (UTC)
commit 1dff8d40c1dbcea6e3e90aeb60b6e59720142936
Author: Ell <ell_se yahoo com>
Date: Sun May 27 13:53:02 2018 -0400
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.
(cherry picked from commit 3fa4c01bcf7ab207216099640b2c05452200dab2)
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]