dbaccess/source/core/dataaccess/connection.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1c2e63ec15df7f314aee83d9b9be455eb8ac4ed0
Author:     prrvchr <prrv...@gmail.com>
AuthorDate: Sun Aug 10 22:21:09 2025 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Aug 11 07:54:20 2025 +0200

    tdf#167495 Base need to close ResultSet after using it.
    
    Change-Id: Ief6eb9c7a12871de33e748d87045f6393faee75f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189328
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/dbaccess/source/core/dataaccess/connection.cxx 
b/dbaccess/source/core/dataaccess/connection.cxx
index 3b51edccd73f..61d4f1bc7ebf 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -315,6 +315,9 @@ OConnection::OConnection(ODatabaseSource& _rDB
                         break;
                     }
                 }
+                Reference<XCloseable> xCloseable(xRes, UNO_QUERY);
+                if (xCloseable.is())
+                    xCloseable->close();
             }
             // tdf#130564: getTableTypes retrieves only the table types of the 
current database and not all the possible table types
             // provided by the DBMS. JDBC would need a new function, something 
like "supportsViews()"

Reply via email to