Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-7194

Potential Resource leak in IOUtils.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.21.1, 0.22.0, 0.23.0
    • io
    • None
    • Reviewed

    Description

      IOUtils.java
      try {
            copyBytes(in, out, buffSize);
          } finally {
            if(close) {
              out.close();
              in.close();
            }
          }
      

      In the above code if any exception throws from the out.close() statement, in.close() statement will not execute and the input stream will not be closed.

      Attachments

        1. HADOOP-7194.patch
          4 kB
          Devaraj Kavali

        Issue Links

          Activity

            People

              devaraj Devaraj Kavali
              devaraj Devaraj Kavali
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: