commit | 32d41b1b38b8ac06aa7b718b1d0da2d2ed71c557 | [log] [tgz] |
---|---|---|
author | Shukang Zhou <shukang@google.com> | Thu Jan 12 18:59:26 2017 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Jan 12 18:59:31 2017 +0000 |
tree | d40545bde198fda9e66ace41e7fcd25b3297e4d4 | |
parent | d7b92cf873a05f8b74ae494d845964d4d365b1fa [diff] | |
parent | b9520e49b20f70e991b97fb77f2b5dc015d56229 [diff] |
Merge "Close a file descriptor before losing its reference."
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 74304f0..c87412e 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -21907,6 +21907,10 @@ profilerInfo.profileFd = fd; proc.thread.profilerControl(start, profilerInfo, profileType); fd = null; + try { + mProfileFd.close(); + } catch (IOException e) { + } mProfileFd = null; } else { stopProfilerLocked(proc, profileType);