[ 
https://issues.apache.org/jira/browse/ARTEMIS-1635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram resolved ARTEMIS-1635.
-------------------------------------
    Resolution: Duplicate

> 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
>            Priority: Major
>
> {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
(v8.20.10#820010)

Reply via email to