parseLog() in NaginatorListener.java does not close its BufferedReader or FileReader, leaking OS resources

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: naginator-plugin
    • None

      Hello!

      I was taking a look at how regex was handled in this plugin, and ran across this:

      https://github.com/jenkinsci/naginator-plugin/blob/master/src/main/java/com/chikli/hudson/plugin/naginator/NaginatorListener.java#L144-L161

      It looks like the plugin never actually calls close on either reader. This will leak file handles and potentially system/OS buffers for each build log (and build logs can get huge).

      This method should close the outside wrapper / buffered reader.

            Assignee:
            Nicolas De Loof
            Reporter:
            Martin Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: