From 2e3df52862859ffe4b75b436e59a7d0310852f97 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 12 Jul 2021 11:29:37 +0200 Subject: [PATCH] Revert "LibThreading: Fix BackgroundAction result use-after-free" This reverts commit b2e6088bff209e8bbb838cc86233e7d3f24ed650. This was a speculative fix that ended up not fixing the issue. --- Userland/Libraries/LibThreading/BackgroundAction.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibThreading/BackgroundAction.h b/Userland/Libraries/LibThreading/BackgroundAction.h index 18b346b154..d169ae4aa3 100644 --- a/Userland/Libraries/LibThreading/BackgroundAction.h +++ b/Userland/Libraries/LibThreading/BackgroundAction.h @@ -66,8 +66,8 @@ private: enqueue_work([this] { m_result = m_action(*this); if (m_on_complete) { - Core::EventLoop::current().post_event(*this, make([this, result = m_result.release_value()](auto&) { - m_on_complete(result); + Core::EventLoop::current().post_event(*this, make([this](auto&) { + m_on_complete(m_result.release_value()); this->remove_from_parent(); })); Core::EventLoop::wake();