Close stream in 'I' switch handling
PATCH 4/10 Close stream in 'I' switch handling
The file containing the list of devices was never closed after processing was complete.
Signed-off-by Eric Sandeen <[email protected]>
---
blktrace.c +6 -2
@@ -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 ; }