Fix double close in GetTreeBytes.
calculate_dir_size closes the fd that it receives. Bug: http://b/80446935 Test: treehugger Change-Id: I56a428cd7eb78e56c55434628c1c7b2b87637c81
This commit is contained in:
parent
6054bc3ded
commit
72fb1a6d6c
1 changed files with 1 additions and 3 deletions
|
@ -523,9 +523,7 @@ uint64_t GetTreeBytes(const std::string& path) {
|
|||
PLOG(WARNING) << "Failed to open " << path;
|
||||
return -1;
|
||||
} else {
|
||||
uint64_t res = calculate_dir_size(dirfd);
|
||||
close(dirfd);
|
||||
return res;
|
||||
return calculate_dir_size(dirfd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue