Close the file after reading it.
This commit is contained in:
		
							parent
							
								
									133fd99caf
								
							
						
					
					
						commit
						fdab4fc061
					
				|  | @ -127,7 +127,8 @@ code_change(_OldVsn, State, _Extra) -> | |||
| %% eof. | ||||
| read_proc_file(File) -> | ||||
|     {ok, IoDevice} = file:open(File, [read, raw]), | ||||
|     read_proc_file(IoDevice, []). | ||||
|     read_proc_file(IoDevice, []), | ||||
|     file:close(IoDevice). | ||||
|      | ||||
| read_proc_file(IoDevice, Acc) -> | ||||
|     case file:read(IoDevice, ?BUFFER_SIZE) of | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue