diff options
author | Elliott Hughes <enh@google.com> | 2014-09-22 17:43:09 -0700 |
---|---|---|
committer | Dmitriy Ivanov <dimitry@google.com> | 2014-10-31 17:03:21 -0700 |
commit | 748fbe5c41d97433dc756a50812e1caf6a6ef727 (patch) | |
tree | 8b6c5d1bd271d26838e11806c1ec2cb6419a9744 /libc | |
parent | d5eb10875affb316c4dfc3b6ceb91df244518956 (diff) | |
download | bionic-748fbe5c41d97433dc756a50812e1caf6a6ef727.tar.gz |
Fix a couple more cases of missing CLOEXEC.
The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.
Bug: 18186310
(cherry picked from commit 0dc39f9952c5e3a3121ea77357bb264ef0f8ded7)
Change-Id: I3e84488fc246f6c28cbd82e96d0cd4343a12c28a
Diffstat (limited to 'libc')
-rw-r--r-- | libc/bionic/system_properties.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp index a564c3939..0e16bf314 100644 --- a/libc/bionic/system_properties.cpp +++ b/libc/bionic/system_properties.cpp @@ -475,8 +475,8 @@ static const prop_info *find_property(prop_bt *const trie, const char *name, static int send_prop_msg(const prop_msg *msg) { - const int fd = socket(AF_LOCAL, SOCK_STREAM, 0); - if (fd < 0) { + const int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0); + if (fd == -1) { return -1; } |