diff options
author | dan sinclair <dsinclair@chromium.org> | 2019-05-30 13:03:59 -0400 |
---|---|---|
committer | David Neto <dneto@google.com> | 2019-05-30 13:03:59 -0400 |
commit | f8e6fbd4d6ace6280e80e50635a6874690a6a2be (patch) | |
tree | b26aa56c4a79d110957a89ada9496ebbadaea08f /samples | |
parent | 25852407411ad592a32f5732f68dbb70134277f4 (diff) | |
download | amber-f8e6fbd4d6ace6280e80e50635a6874690a6a2be.tar.gz |
Add missing file close (#535)
Fixes #532
Diffstat (limited to 'samples')
-rw-r--r-- | samples/amber.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/amber.cc b/samples/amber.cc index 8d185d0..7a9cd14 100644 --- a/samples/amber.cc +++ b/samples/amber.cc @@ -210,6 +210,7 @@ std::string ReadFile(const std::string& input_file) { uint64_t tell_file_size = static_cast<uint64_t>(ftell(file)); if (tell_file_size <= 0) { std::cerr << "Input file of incorrect size: " << input_file << std::endl; + fclose(file); return {}; } fseek(file, 0, SEEK_SET); |