Commit a375e1ac authored by Bryon Gloden, CISSP®'s avatar Bryon Gloden, CISSP® Committed by Bryon Gloden

close opened file descriptors properly

parent c59473d5
......@@ -91,6 +91,7 @@ bool File::WriteStringToFile(const string& contents, const string& name) {
if (fwrite(contents.data(), 1, contents.size(), file) != contents.size()) {
GOOGLE_LOG(ERROR) << "fwrite(" << name << "): " << strerror(errno);
fclose(file);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment