From f8e6fbd4d6ace6280e80e50635a6874690a6a2be Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 30 May 2019 13:03:59 -0400 Subject: Add missing file close (#535) Fixes #532 --- samples/amber.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'samples') 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(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); -- cgit v1.2.3