diff options
author | Zim <zezeozue@google.com> | 2021-07-29 20:51:10 +0100 |
---|---|---|
committer | Zim <zezeozue@google.com> | 2021-07-29 22:05:17 +0100 |
commit | 366493edd29b1ec2a7be0323dd547d242e6797fa (patch) | |
tree | 2328b35bf9f07e42e91bd248fc4de2ad3c16d1ca /rs/java/android/renderscript/ProgramVertexFixedFunction.java | |
parent | 9eee7d3f29d051cdc29404ea8fa235695796d1cc (diff) |
Fix fd leak while bypassing transcoding in media APIs
To call the media service while bypassing transcoding there are 4 file
descriptors involved:
A: The original file descriptor the app owns and is responsible for
closing
B: Dupe of A, to pass into the MediaStore API as an input to receive a
non-transoding fd
C: The output from the MediaStore API
D: Final fd owned by the media service, after C gets duped over binder
as part of setDataSource
We were leaking (B) and (C). Now we close them appropriately.
See I0124ec8fbd0471237e99bab321f903544f8fe1f8 for another 2 fd leak
fix in MediaProvider
Test: atest TranscodeTest
Test: Manual with 'adb shell lsof | grep <filename>'
Bug: 194828489
Bug: 179804072
Change-Id: I978257bbc4a8f6813b6e6a5ce22124257204f432
Merged-In: I978257bbc4a8f6813b6e6a5ce22124257204f432
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions