From c3b4c7a9cff3f7ecdc0a2465173f56152cc6f9ef Mon Sep 17 00:00:00 2001 From: wilderrodrigues Date: Thu, 4 Jun 2015 08:18:17 +0200 Subject: [PATCH] Coverity issue 1116509 - Assigning the the new returned ResultSet to the rs variable in order to get it closed in the finally block Signed-off-by: Daan Hoogland --- engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java index 653124f189b..bc9c2f0d501 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java +++ b/engine/schema/src/com/cloud/upgrade/dao/VersionDaoImpl.java @@ -108,7 +108,7 @@ public class VersionDaoImpl extends GenericDaoBase implements V rs.close(); pstmt.close(); pstmt = conn.prepareStatement("SELECT is_static_nat from firewall_rules"); - pstmt.executeQuery(); + rs = pstmt.executeQuery(); return "2.2.1"; } catch (final SQLException e) { s_logger.debug("Assuming the exception means static_nat field doesn't exist in firewall_rules table, returning version 2.2.2");