CachedAppOptimizer: fix fd leak. am: 9a24046259
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1730080 Change-Id: I58fe95374f592ca6a3397396075dd684b4fd2575
This commit is contained in:
@@ -86,7 +86,7 @@ static int compactMemory(const std::vector<Vma>& vmas, int pid, int madviseType)
|
|||||||
|
|
||||||
int pidfd = syscall(__NR_pidfd_open, pid, 0);
|
int pidfd = syscall(__NR_pidfd_open, pid, 0);
|
||||||
err = -errno;
|
err = -errno;
|
||||||
if (err < 0) {
|
if (pidfd < 0) {
|
||||||
// Skip compaction if failed to open pidfd with any error
|
// Skip compaction if failed to open pidfd with any error
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user