Merge "CachedAppOptimizer: fix fd leak." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7b68417fe8
@@ -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