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

Commit 1a98f8ba authored by Henri Chataing's avatar Henri Chataing
Browse files

[MTK] [CONVERGENCE] [ALPS08049719] Fix fdsan

Bug: 328841686
Fix: 328841686
Test: m com.android.btservices
Flag: EXEMPT, minor bug fix
Change-Id: Ibc896ef6eab3cc3b9a96ccd9c0a659baa64d944e
parent 1835706c
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;