Narges Shadab created HDFS-16037:
------------------------------------

             Summary: Possible Resource Leak in 
org.apache.hadoop.hdfs.tools.offlineImageViewer#FSImageLoader
                 Key: HDFS-16037
                 URL: https://issues.apache.org/jira/browse/HDFS-16037
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Narges Shadab


We notice a possible resource leak in line 
[113|https://github.com/apache/hadoop/blob/59172ada9014f8c056f2bd37b25a26572ca643af/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FSImageLoader.java#L113].
 {{file}} remains open if line 115 or 118 throws an IOException. We should 
define {{fin}} and {{file}} in try-with-resources.

I've submitted a pull request to fix it.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to