diff options
| author | 2013-12-06 14:03:47 -0800 | |
|---|---|---|
| committer | 2014-01-06 14:31:28 -0800 | |
| commit | 76e5ca81b3ba5a4f52126f2ec8907679b4356292 (patch) | |
| tree | 99aaa27a81b2cc0f52f838d71ad16ad0029a566c | |
| parent | 02f042ddd9ddf47ef88c4f174eb19a9bee296a45 (diff) | |
Fix descriptor leak after accepting connections
After accepting a connection on a listening socket and
storing the resulting FileDescriptor into a newly created
LocalSocketImpl, the new impl's "descriptor was created
locally and should be closed normally" flag should be set.
Bug: 11805817
(cherry picked from commit 3e7305c6bf6062b5cb1e2ddcec6c6d30b4a8bc0d)
Change-Id: I723d7c5544ee4b6858894c215716cbc32a958df1
| -rw-r--r-- | core/java/android/net/LocalSocketImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/net/LocalSocketImpl.java b/core/java/android/net/LocalSocketImpl.java index b2ee50afc608..119e5330f127 100644 --- a/core/java/android/net/LocalSocketImpl.java +++ b/core/java/android/net/LocalSocketImpl.java @@ -326,6 +326,7 @@ class LocalSocketImpl } s.fd = accept(fd, s); + s.mFdCreatedInternally = true; } /** @@ -536,4 +537,3 @@ class LocalSocketImpl close(); } } - |