From 7c111c0bfbe6bf54cfbce8ad67e0d9b150b3d195 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 22 Dec 2018 00:37:57 +0100 Subject: [PATCH] Fix a follow-up error introduced when fixing a Coverity Scan issue. --- futatabi/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/futatabi/main.cpp b/futatabi/main.cpp index 3146aa5..edff307 100644 --- a/futatabi/main.cpp +++ b/futatabi/main.cpp @@ -367,11 +367,12 @@ void load_frame_file(const char *filename, const string &basename, unsigned file } off_t size = ftell(fp); + fclose(fp); + if (size == -1) { fprintf(stderr, "WARNING: %s: ftell() failed (%s).\n", filename, strerror(errno)); return; } - fclose(fp); db->store_frame_file(basename, size, all_frames); } -- 2.39.2