----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/22194/#review44606 -----------------------------------------------------------
engine/schema/src/com/cloud/upgrade/dao/Upgrade421to430.java <https://reviews.apache.org/r/22194/#comment79025> Here, it is creating multiple statements but close again is happening outside of for loop. This will still result in leak. engine/schema/src/com/cloud/upgrade/dao/Upgrade421to430.java <https://reviews.apache.org/r/22194/#comment79026> Related to previous comment, either move prepared statement out of forloop and retain close here. engine/schema/src/com/cloud/upgrade/dao/Upgrade421to430.java <https://reviews.apache.org/r/22194/#comment79027> Once you close set it back to null. Otherwise in finally it may still refer to dangling pointer. - Santhosh Edukulla On June 3, 2014, 9:31 a.m., Rajani Karuturi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/22194/ > ----------------------------------------------------------- > > (Updated June 3, 2014, 9:31 a.m.) > > > Review request for cloudstack and Koushik Das. > > > Repository: cloudstack-git > > > Description > ------- > > Fixed Resource leak (RESOURCE_LEAK) > 11. overwrite_var: Overwriting "pstmt" in "pstmt = > conn.prepareStatement("INSERT INTO `cloud`.`ldap_configuration`(hostname, > port) VALUES(?,?)")" leaks the resource that "pstmt" refers to. > > > Diffs > ----- > > engine/schema/src/com/cloud/upgrade/dao/Upgrade421to430.java 7e26132 > > Diff: https://reviews.apache.org/r/22194/diff/ > > > Testing > ------- > > > Thanks, > > Rajani Karuturi > >