projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5293cfd
)
Close stream in 'I' switch handling
author
Eric Sandeen
<sandeen@redhat.com>
Fri, 16 Dec 2011 19:11:33 +0000
(13:11 -0600)
committer
Jens Axboe
<jaxboe@fusionio.com>
Wed, 1 Feb 2012 12:14:27 +0000
(13:14 +0100)
The file containing the list of devices was never closed
after processing was complete.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
blktrace.c
patch
|
blob
|
blame
|
history
diff --git
a/blktrace.c
b/blktrace.c
index 49cfca61352ddca5233f669e76edb1bea54f84e2..228838af1758954ea8bf8d24d9ea71c224d9884c 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-2076,9
+2076,13
@@
static int handle_args(int argc, char *argv[])
return 1;
}
- while (fscanf(ifp, "%s\n", dev_line) == 1)
- if (add_devpath(dev_line) != 0)
+ while (fscanf(ifp, "%s\n", dev_line) == 1) {
+ if (add_devpath(dev_line) != 0) {
+ fclose(ifp);
return 1;
+ }
+ }
+ fclose(ifp);
break;
}