summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--programs/Makefile1
-rw-r--r--programs/lz4cli.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 3ca46d7..9585c9f 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -250,6 +250,7 @@ test-mem: lz4 datagen fuzzer frametest fullbench
./datagen -g16MB > tmp
valgrind --leak-check=yes ./lz4 -9 -B5D -f tmp tmp2
valgrind --leak-check=yes ./lz4 -t tmp2
+ valgrind --leak-check=yes ./lz4 -bi1 tmp
valgrind --leak-check=yes ./fullbench -i1 tmp
./datagen -g256MB > tmp
valgrind --leak-check=yes ./lz4 -B4D -f -vq tmp $(VOID)
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 888f21e..2870c97 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -470,7 +470,12 @@ int main(int argc, char** argv)
if (!strcmp(input_filename, stdinmark) && IS_CONSOLE(stdin) ) badusage();
/* Check if benchmark is selected */
- if (bench) return BMK_benchFiles(inFileNames, ifnIdx, cLevel);
+ if (bench)
+ {
+ int bmkResult = BMK_benchFiles(inFileNames, ifnIdx, cLevel);
+ free(inFileNames);
+ return bmkResult;
+ }
/* No output filename ==> try to select one automatically (when possible) */
while (!output_filename)