am 422bffb2: am 0b12f0a7: Merge "processgroup: close directories opened by removeAllProcessGroups()" into lmp-dev

* commit '422bffb240e739210260438f5af843da98944b1e':
  processgroup: close directories opened by removeAllProcessGroups()
This commit is contained in:
Colin Cross 2014-08-21 04:17:48 +00:00 committed by Android Git Automerger
commit 0e53fbc8a9
1 changed files with 3 additions and 2 deletions

View File

@ -171,6 +171,7 @@ static void removeUidProcessGroups(const char *uid_path)
SLOGV("removing %s\n", path);
rmdir(path);
}
closedir(uid);
}
}
@ -180,8 +181,7 @@ void removeAllProcessGroups()
DIR *root = opendir(PROCESSGROUP_CGROUP_PATH);
if (root == NULL) {
SLOGE("failed to open %s: %s", PROCESSGROUP_CGROUP_PATH, strerror(errno));
}
if (root != NULL) {
} else {
struct dirent cur;
struct dirent *dir;
while ((readdir_r(root, &cur, &dir) == 0) && dir) {
@ -199,6 +199,7 @@ void removeAllProcessGroups()
SLOGV("removing %s\n", path);
rmdir(path);
}
closedir(root);
}
}