mirror of https://github.com/apache/cloudstack.git
Fix CID 1116743 Resource leak
This commit is contained in:
parent
5cb3cd64e5
commit
f6f4a93145
|
|
@ -203,12 +203,17 @@ public class SnapshotDataStoreDaoImpl extends GenericDaoBase<SnapshotDataStoreVO
|
|||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
long sid = rs.getLong(1);
|
||||
String rl = rs.getString(2);
|
||||
long snid = rs.getLong(3);
|
||||
return findByStoreSnapshot(role, sid, snid);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
s_logger.debug("Failed to find parent snapshot: " + e.toString());
|
||||
} finally {
|
||||
try {
|
||||
if (pstmt != null)
|
||||
pstmt.close();
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue