]> git.sesse.net Git - nageru/commitdiff
Fix a follow-up error introduced when fixing a Coverity Scan issue.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 21 Dec 2018 23:37:57 +0000 (00:37 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 21 Dec 2018 23:37:57 +0000 (00:37 +0100)
futatabi/main.cpp

index 3146aa52d5eb2f55bf6d0fd0ca9adede42fab95f..edff307e38bd1a98584ef3c0a94d1e176f192538 100644 (file)
@@ -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);
 }