OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99bd08f
)
Bluetooth: AsyncFdWatcher: Fix FD leak
author
Peng Qi
<peng.qi@mediatek.com>
Tue, 22 Aug 2017 09:38:34 +0000
(17:38 +0800)
committer
Cheney Ni
<cheneyni@google.com>
Wed, 2 Dec 2020 07:00:40 +0000
(15:00 +0800)
AsyncFdWatcher thread notification pipe fds without close
which causes FD leak under Bluetooth on/off stress test.
Close the notification pipe fds when shut down Bluetooth.
Bug:
174630553
Test: Bluetooth on/off stress test
Change-Id: I7575adec49161f9764f0e070ef3c1043b8295a97
(cherry picked from commit
5c6da2669cea95d775b4a1ab0ddcdad4cac82671
)
vendor_libs/linux/interface/async_fd_watcher.cc
patch
|
blob
|
history
diff --git
a/vendor_libs/linux/interface/async_fd_watcher.cc
b/vendor_libs/linux/interface/async_fd_watcher.cc
index
ef4a959
..
87d2506
100644
(file)
--- a/
vendor_libs/linux/interface/async_fd_watcher.cc
+++ b/
vendor_libs/linux/interface/async_fd_watcher.cc
@@
-102,6
+102,9
@@
int AsyncFdWatcher::stopThread() {
timeout_cb_ = nullptr;
}
+ close(notification_listen_fd_);
+ close(notification_write_fd_);
+
return 0;
}