You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Jared Bunting (JIRA)" <ji...@apache.org> on 2010/12/20 20:35:07 UTC

[jira] Updated: (SHIRO-227) Leak in getPermissions method of JdbcRealm

     [ https://issues.apache.org/jira/browse/SHIRO-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jared Bunting updated SHIRO-227:
--------------------------------

    Attachment: JdbcRealm_Leak_Fix.patch

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

> Leak in getPermissions method of JdbcRealm
> ------------------------------------------
>
>                 Key: SHIRO-227
>                 URL: https://issues.apache.org/jira/browse/SHIRO-227
>             Project: Shiro
>          Issue Type: Bug
>            Reporter: Jared Bunting
>         Attachments: JdbcRealm_Leak_Fix.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.