From: Yann Collet Date: Sun, 12 Apr 2015 10:37:55 +0000 (+0100) Subject: Fixed : minor coverity warning X-Git-Tag: upstream/1.9.3~243^2~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f49666cbc5486693b84f210a1af6b71fff1133e;p=platform%2Fupstream%2Flz4.git Fixed : minor coverity warning --- 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));