Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] Close iolog file if reading version string fails
@ 2011-01-05  9:22 Stefan Hajnoczi
  2011-01-05 10:04 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-01-05  9:22 UTC (permalink / raw)
  To: fio; +Cc: Stefan Hajnoczi

Avoid leaking the iolog file if reading the version string fails.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 log.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/log.c b/log.c
index 266dc06..d4850a5 100644
--- a/log.c
+++ b/log.c
@@ -415,6 +415,7 @@ static int init_iolog_read(struct thread_data *td)
 	if (!p) {
 		td_verror(td, errno, "iolog read");
 		log_err("fio: unable to read iolog\n");
+		fclose(f);
 		return 1;
 	}
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Close iolog file if reading version string fails
  2011-01-05  9:22 [PATCH] Close iolog file if reading version string fails Stefan Hajnoczi
@ 2011-01-05 10:04 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2011-01-05 10:04 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: fio

On 2011-01-05 10:22, Stefan Hajnoczi wrote:
> Avoid leaking the iolog file if reading the version string fails.

Thanks Stefan, applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-05 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-05  9:22 [PATCH] Close iolog file if reading version string fails Stefan Hajnoczi
2011-01-05 10:04 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox