cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [1/2] git commit: updated refs/heads/master to f6f4a93
Date Thu, 07 Nov 2013 15:23:29 GMT
Updated Branches:
  refs/heads/master 3f5b8f706 -> f6f4a9314


Fix CID 1116743 Resource leak


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f6f4a931
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f6f4a931
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f6f4a931

Branch: refs/heads/master
Commit: f6f4a9314517023487409ac7cea96adb7b4c0256
Parents: 5cb3cd6
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Thu Nov 7 16:22:53 2013 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Thu Nov 7 16:23:20 2013 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f6f4a931/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
index ee00dd5..7b9cf95 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java
@@ -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;
     }


Mime
View raw message