Merge "Close a file descriptor before losing its reference."

This commit is contained in:
Shukang Zhou
2017-01-12 18:59:26 +00:00
committed by Android (Google) Code Review

View File

@@ -21907,6 +21907,10 @@ public class ActivityManagerService extends IActivityManager.Stub
profilerInfo.profileFd = fd;
proc.thread.profilerControl(start, profilerInfo, profileType);
fd = null;
try {
mProfileFd.close();
} catch (IOException e) {
}
mProfileFd = null;
} else {
stopProfilerLocked(proc, profileType);