summaryrefslogtreecommitdiff
path: root/services/inputflinger/EventHub.cpp
diff options
context:
space:
mode:
author Nick Kralevich <nnk@google.com> 2018-12-15 11:59:30 -0800
committer Nick Kralevich <nnk@google.com> 2018-12-15 11:59:30 -0800
commitfcf1b2bcce9fd9d1997745d35c6ac36ddd2448a9 (patch)
treea1696bdd02216ccc5c6d13ffbc544f3ae2609741 /services/inputflinger/EventHub.cpp
parent0dd82d8da5aa41dd41744fd35a1b94352796fb38 (diff)
use epoll_create1
epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC) instead. Bug: 120983106 Test: compiles and boots Change-Id: I59cebb997de9d8b99804cc45a962751976d07ce6
Diffstat (limited to 'services/inputflinger/EventHub.cpp')
-rw-r--r--services/inputflinger/EventHub.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp
index 4d9a2a0254..ccc24b950e 100644
--- a/services/inputflinger/EventHub.cpp
+++ b/services/inputflinger/EventHub.cpp
@@ -206,7 +206,7 @@ EventHub::EventHub(void) :
mPendingEventCount(0), mPendingEventIndex(0), mPendingINotify(false) {
acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID);
- mEpollFd = epoll_create(EPOLL_SIZE_HINT);
+ mEpollFd = epoll_create1(EPOLL_CLOEXEC);
LOG_ALWAYS_FATAL_IF(mEpollFd < 0, "Could not create epoll instance. errno=%d", errno);
mINotifyFd = inotify_init();