Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d382630 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "GD Reactor: Fix a potential use-after-free"

parents 308ab6b5 63d8c70b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -145,10 +145,11 @@ void Reactor::Run() {
        reactable->on_write_ready_.Run();
      }
      {
        std::lock_guard<std::mutex> reactable_lock(reactable->mutex_);
        std::unique_lock<std::mutex> reactable_lock(reactable->mutex_);
        reactable->is_executing_ = false;
        if (reactable->removed_) {
          reactable->finished_promise_->set_value();
          reactable_lock.unlock();
          delete reactable;
        }
      }