Merge "Fix double close in GetTreeBytes."

am: 142702dc82

Change-Id: I1c9f259d4d372ef1a3c36a9f884e39b8003f7ff0
This commit is contained in:
Josh Gao 2018-06-08 17:17:56 -07:00 committed by android-build-merger
commit 45175c437f

View file

@ -545,9 +545,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);
}
}