Bug 58062

Summary: Close IO Streams in finally statement
Product: Log4j - Now in Jira Reporter: Tang Xinye <tgttxy>
Component: OtherAssignee: log4j-dev <log4j-dev>
Status: REOPENED ---    
Severity: critical    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: https://github.com/apache/log4j/pull/2

Description Tang Xinye 2015-06-20 15:22:49 UTC
The problem here is that if an exception is thrown during the read process the method will exit without closing the stream and hence without releasing the file system resources, it may run out of resources before it does run.I will make a commit in github right now.
Comment 1 Tang Xinye 2015-06-20 15:38:03 UTC
I've made a pull request in https://github.com/apache/log4j/pull/2/files to resolve the bug.
Comment 2 Gary Gregory 2015-06-25 04:02:21 UTC
Note that v1 is not actively maintained. I strongly encourage you to migrate to v2, which includes a v1.2 compatibility layer.