From 8f49666cbc5486693b84f210a1af6b71fff1133e Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sun, 12 Apr 2015 11:37:55 +0100 Subject: Fixed : minor coverity warning --- programs/fullbench.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/fullbench.c b/programs/fullbench.c index 40d95e5..658c365 100644 --- a/programs/fullbench.c +++ b/programs/fullbench.c @@ -569,9 +569,9 @@ int fullSpeedBench(char** fileNamesTable, int nbFiles) /* Memory size adjustments */ inFileSize = BMK_GetFileSize(inFileName); - if (inFileSize==0) { DISPLAY( "file is empty\n"); CLEANEXIT(11); } + if (inFileSize==0) { DISPLAY( "file is empty\n"); fclose(inFile); CLEANEXIT(11); } benchedSize = (size_t) BMK_findMaxMem(inFileSize*2) / 2; /* because 2 buffers */ - if (benchedSize==0) { DISPLAY( "not enough memory\n"); CLEANEXIT(11); } + if (benchedSize==0) { DISPLAY( "not enough memory\n"); fclose(inFile); CLEANEXIT(11); } if ((U64)benchedSize > inFileSize) benchedSize = (size_t)inFileSize; if (benchedSize < inFileSize) DISPLAY("Not enough memory for '%s' full size; testing %i MB only...\n", inFileName, (int)(benchedSize>>20)); -- cgit v0.12