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

Commit b58cf8c0 authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge "[MTK] [CONVERGENCE] [ALPS08049719] Fix fdsan" into main

parents 7eb12ef3 1a98f8ba
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -48,10 +48,11 @@ struct Reactor::Event::impl {
    log::assert_that(fd_ != -1, "Unable to create nonblocking event file descriptor semaphore");
  }
  ~impl() {
    log::assert_that(fd_ != -1, "Unable to close a never-opened event file descriptor");
    if (fd_ != -1) {
      close(fd_);
      fd_ = -1;
    }
  }
  int fd_ = -1;
};

@@ -72,6 +73,7 @@ void Reactor::Event::Close() {
  int close_status;
  RUN_NO_INTR(close_status = close(pimpl_->fd_));
  log::assert_that(close_status != -1, "assert failed: close_status != -1");
  pimpl_->fd_ = -1;
}
void Reactor::Event::Notify() {
  uint64_t val = 1;