cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/master to fa3bbe9
Date Tue, 03 Jun 2014 13:39:39 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 793462e5f -> fa3bbe9a1


Fixed ResouceLeak on pstmtCidr in the function Upgrade430to440.moveCidrsToTheirOwnTable as
reported by coverity

Fixed another leak which might occur due to outer while loop.

Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit 004e0cbf61e9bf29bd716c8a0d7ac2f10c57433b)


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

Branch: refs/heads/master
Commit: fa3bbe9a1946b3597fe5d1a8a448607d54106b7e
Parents: 793462e
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Tue Jun 3 14:09:20 2014 +0530
Committer: Daan Hoogland <daan@onecht.net>
Committed: Tue Jun 3 15:39:28 2014 +0200

----------------------------------------------------------------------
 engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fa3bbe9a/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
index 7fe285f..a3ac447 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java
@@ -244,6 +244,9 @@ public class Upgrade430to440 implements DbUpgrade {
             pstmtItem = conn.prepareStatement(networkAclItemSql);
             rsItems = pstmtItem.executeQuery();
 
+            String networkAclItemCidrSql = "INSERT INTO `cloud`.`network_acl_item_cidrs`
(network_acl_item_id, cidr) VALUES (?,?)";
+            pstmtCidr = conn.prepareStatement(networkAclItemCidrSql);
+
             // for each network acl item
             while(rsItems.next()) {
                 long itemId = rsItems.getLong(1);
@@ -253,8 +256,6 @@ public class Upgrade430to440 implements DbUpgrade {
                 // split it
                 String[] cidrArray = cidrList.split(",");
                 // insert a record per cidr
-                String networkAclItemCidrSql = "INSERT INTO `cloud`.`network_acl_item_cidrs`
(network_acl_item_id, cidr) VALUES (?,?)";
-                pstmtCidr = conn.prepareStatement(networkAclItemCidrSql);
                 pstmtCidr.setLong(1, itemId);
                 for (String cidr : cidrArray) {
                     pstmtCidr.setString(2, cidr);


Mime
View raw message