commit | 1102a8a7675d6b718e81b28a10173a2e073c3820 | [log] [tgz] |
---|---|---|
author | Feng Xiao <[email protected]> | Fri Aug 05 15:28:42 2016 -0700 |
committer | GitHub <[email protected]> | Fri Aug 05 15:28:42 2016 -0700 |
tree | f5f310bc1c85b5ba160ee0f507c6ea69e5ef6108 | |
parent | e30b7b446175c75cc85beca9015685c6f7705af4 [diff] | |
parent | a375e1acfd41432cc5a6be3de20067cce7dee5fd [diff] |
Merge pull request #1923 from bryongloden/patch-1 close opened file descriptors properly
diff --git a/src/google/protobuf/testing/file.cc b/src/google/protobuf/testing/file.cc index 3d07b12..bc76c84 100644 --- a/src/google/protobuf/testing/file.cc +++ b/src/google/protobuf/testing/file.cc
@@ -91,6 +91,7 @@ if (fwrite(contents.data(), 1, contents.size(), file) != contents.size()) { GOOGLE_LOG(ERROR) << "fwrite(" << name << "): " << strerror(errno); + fclose(file); return false; }