X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=inline;f=t%2Fbtrace2fio.c;h=baf29acb9d41a9434ec028f8212f8842f6ff7972;hb=18be35e85942fc4553d580fd14c9eb1b94153111;hp=5666a560c0beca15941ad596a3469a4422264d36;hpb=356c552d4654dba6ebc8461228ab0aa728d304c2;p=fio.git diff --git a/t/btrace2fio.c b/t/btrace2fio.c index 5666a560..baf29acb 100644 --- a/t/btrace2fio.c +++ b/t/btrace2fio.c @@ -870,9 +870,11 @@ static int trace_needs_swap(const char *trace_file, int *swap) ret = read(fd, &t, sizeof(t)); if (ret < 0) { + close(fd); perror("read"); return 1; } else if (ret != sizeof(t)) { + close(fd); log_err("fio: short read on trace file\n"); return 1; }