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

Commit 39c53c8a authored by Nick Kralevich's avatar Nick Kralevich
Browse files

use epoll_create1

epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC)
instead.

Bug: 120983106
Test: compiles and boots
Change-Id: I91f213ebb2dd05330dd25ec1ca1fec59b611e7f2
parent c456aab7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static bool test_bit(size_t bit, unsigned long* array) { // NOLINT
}

int ev_init(ev_callback input_cb, bool allow_touch_inputs) {
  g_epoll_fd = epoll_create(MAX_DEVICES + MAX_MISC_FDS);
  g_epoll_fd = epoll_create1(EPOLL_CLOEXEC);
  if (g_epoll_fd == -1) {
    return -1;
  }