You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jiri Daněk (JIRA)" <ji...@apache.org> on 2018/01/24 16:53:00 UTC
[jira] [Created] (ARTEMIS-1635) Coverity: Resource leaks
(RESOURCE_LEAK) in JDBCFileUtils.java
Jiri Daněk created ARTEMIS-1635:
-----------------------------------
Summary: Coverity: Resource leaks (RESOURCE_LEAK) in JDBCFileUtils.java
Key: ARTEMIS-1635
URL: https://issues.apache.org/jira/browse/ARTEMIS-1635
Project: ActiveMQ Artemis
Issue Type: Bug
Affects Versions: 2.5.0
Reporter: Jiri Daněk
{noformat}
** CID 1464333: Resource leaks (RESOURCE_LEAK)
/activemq-artemis/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCFileUtils.java: 48 in org.apache.activemq.artemis.jdbc.store.file.JDBCFileUtils.getDBFileDriver(javax.sql.DataSource, org.apache.activemq.artemis.jdbc.store.sql.SQLProvider)()
________________________________________________________________________________________________________
*** CID 1464333: Resource leaks (RESOURCE_LEAK)
/activemq-artemis/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCFileUtils.java: 48 in org.apache.activemq.artemis.jdbc.store.file.JDBCFileUtils.getDBFileDriver(javax.sql.DataSource, org.apache.activemq.artemis.jdbc.store.sql.SQLProvider)()
42 dbDriver.setJdbcDriverClass(driverClass);
43 return dbDriver;
44 }
45
46 static JDBCSequentialFileFactoryDriver getDBFileDriver(DataSource dataSource, SQLProvider provider) throws SQLException {
47 JDBCSequentialFileFactoryDriver dbDriver;
>>> CID 1464333: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or close JDBC connection open by "dataSource.getConnection()" leaks it.
48 if (POSTGRESQL.equals(PropertySQLProvider.Factory.investigateDialect(dataSource.getConnection()))) {
49 dbDriver = new PostgresSequentialSequentialFileDriver(dataSource, provider);
50 } else {
51 dbDriver = new JDBCSequentialFileFactoryDriver(dataSource, provider);
52 }
53 return dbDriver;
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)