Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-1676

Potential resource leak in RBlockState ctor due to un-closed streams

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Later
    • None
    • None
    • None
    • None

    Description

      In RBlockState ctor,

                DataInputStream tempDataInputStream = new DataInputStream(boundedRangeFileInputStream);
                // Read the init vector from the front of the stream before initializing the cipher stream
                
                int ivLength = tempDataInputStream.readInt();
                byte[] initVector = new byte[ivLength];
                tempDataInputStream.readFully(initVector);
      

      tempDataInputStream should be closed.

      Closing boundedRangeFileInputStream and inputStreamToBeCompressed should be considered as well.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: