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

Commit f47c9105 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

use epoll_create1(EPOLL_CLOEXEC)

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

Bug: 120983106
Test: compiles and boots
Change-Id: I2a733d4482d6a74ceb3254e501cdb5f6de0cd5dc
parent 8fe0eb46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ class BridgeEpollController : private EpollController {
};

FuseBridgeLoop::FuseBridgeLoop() : opened_(true) {
    base::unique_fd epoll_fd(epoll_create1(/* no flag */ 0));
    base::unique_fd epoll_fd(epoll_create1(EPOLL_CLOEXEC));
    if (epoll_fd.get() == -1) {
        PLOG(ERROR) << "Failed to open FD for epoll";
        opened_ = false;