summaryrefslogtreecommitdiff
path: root/libcutils/sockets_unix.cpp
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2016-12-10 12:17:32 -0800
committerNick Kralevich <nnk@google.com>2016-12-10 12:20:11 -0800
commit9596d2b95d3137c476be4b7c15c47c62ef5cbe09 (patch)
tree65cdfce9607c479d6f4e5a988030048c8d2ec70b /libcutils/sockets_unix.cpp
parentb0aa8b23697a55cb1139ab1412d1fd0198726adf (diff)
init/service.cpp: fix FD leak for services with consoles
When init starts a service with a console, it tests for the presence of a readable/writable console device. The test results in a leaked file descriptor. Use access() instead of open() to avoid leaking file descriptors. Bug introduced in 70daa67062c016eea1a30be2e1de0dcba1d23a13. Test: compiles and device boots Change-Id: I4efcfa0bb2cdb09f0455bc04a3a91e784bda7962
Diffstat (limited to 'libcutils/sockets_unix.cpp')
0 files changed, 0 insertions, 0 deletions