commit | 5e1d8745471d1f315113c5c3fd8b93809d9ddff9 | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@fb.com> | Fri Apr 11 11:39:46 2014 -0600 |
committer | Jens Axboe <axboe@fb.com> | Fri Apr 11 11:39:46 2014 -0600 |
tree | 1accdb11e0a5afa65f4e2beb7d3c72628d894530 | |
parent | 4af7c007e120a3fd75cdbbb50d1cf1fd79e67732 [diff] [blame] |
Don't leak f_out file desciptor if specified more than once Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/init.c b/init.c index a0ec914..35fbdf1 100644 --- a/init.c +++ b/init.c
@@ -1719,6 +1719,9 @@ write_bw_log = 1; break; case 'o': + if (f_out) + fclose(f_out); + f_out = fopen(optarg, "w+"); if (!f_out) { perror("fopen output");