commit | 31da12cc1e69a70d7b65619acc32ab3ad051dd13 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@fb.com> | Tue Oct 14 19:55:18 2014 -0600 |
committer | Mohamad Ayyash <mkayyash@google.com> | Fri Mar 06 17:57:24 2015 -0800 |
tree | acca0b763d482ff31902936c3c0626693721441c | |
parent | bf6238ad99d4c07f3548de957f60b1f1d2848822 [diff] [blame] |
t/btrace2fio: fix fd leak on error Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/t/btrace2fio.c b/t/btrace2fio.c index 5666a56..baf29ac 100644 --- a/t/btrace2fio.c +++ b/t/btrace2fio.c
@@ -870,9 +870,11 @@ 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; }