summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-25 10:56:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-25 11:38:02 +0200
commit4632f935951584826d18f04939cf6c809fd370cc (patch)
treefbb103faeeab92babe084eedab7a65f7980b1095
parenta312837a1a4d0b9628d5c587c8ab5ec68179a051 (diff)
fix leak in CppunitTest_dbaccess_macros_test
Change-Id: I722ea80688f19cc7f5d60cf3fa08f42dc6b35a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--dbaccess/qa/extras/macros-test.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx
index 6e165ac640ff..dee5919c3463 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -9,6 +9,7 @@
#include <sal/config.h>
#include <test/unoapi_test.hxx>
+#include <com/sun/star/util/XCloseable.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -37,7 +38,8 @@ void DBAccessTest::test()
OUString aFileName;
createFileURL(u"testdb.odb", aFileName);
uno::Reference<lang::XComponent> xComponent = loadFromDesktop(aFileName);
- xComponent->dispose();
+ uno::Reference<util::XCloseable> xDocCloseable(xComponent, UNO_QUERY_THROW);
+ xDocCloseable->close(false);
}
CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);