Merge "CachedAppOptimizer: fix fd leak." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-02-24 01:31:56 +00:00
committed by Android (Google) Code Review

View File

@@ -86,7 +86,7 @@ static int compactMemory(const std::vector<Vma>& vmas, int pid, int madviseType)
int pidfd = syscall(__NR_pidfd_open, pid, 0);
err = -errno;
if (err < 0) {
if (pidfd < 0) {
// Skip compaction if failed to open pidfd with any error
return err;
}