Shiro
  1. Shiro
  2. SHIRO-227

Leak in getPermissions method of JdbcRealm

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      It appears that the JdbcRealm.getPermissions is leaking PreparedStatements and ResultSets. These are both created inside a for loop, but the finally block with close statements is outside of the loop.

        Activity

        Hide
        Jared Bunting added a comment -

        Fixes the leak by closing the ResultSet on each iteration of the loop, and only ever creating a single PreparedStatement.

        Show
        Jared Bunting added a comment - Fixes the leak by closing the ResultSet on each iteration of the loop, and only ever creating a single PreparedStatement.
        Hide
        Kalle Korhonen added a comment -

        Thanks for the patch!

        Show
        Kalle Korhonen added a comment - Thanks for the patch!
        Hide
        Les Hazlewood added a comment -

        re-closing after associating a 'Fix Version'

        Show
        Les Hazlewood added a comment - re-closing after associating a 'Fix Version'

          People

          • Assignee:
            Kalle Korhonen
            Reporter:
            Jared Bunting
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development