summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-08-06 15:33:46 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2014-08-06 13:48:45 +0000
commit1e1b2c563d23eb59ceea8ba07335878aab5b1386 (patch)
treea215efdcbd2c3b4d270cad06683fafec0668ff68
parentb7a46a22b6a0a5429adec015255ce76e41dced41 (diff)
Don't leak the previous cache
Change-Id: I61cb1c608a7de8efc63533085e86c6c17c05f545 Reviewed-on: https://gerrit.libreoffice.org/10793 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
-rw-r--r--dbaccess/source/core/api/RowSet.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index e31879e48b55..388e153095cb 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1701,6 +1701,10 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::eInDataManipulation );
SAL_INFO("dbaccess", "ORowSet::impl_prepareAndExecute_throw: creating cache" );
+ if(m_pCache)
+ {
+ DELETEZ(m_pCache);
+ }
m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName, m_bModified, m_bNew,m_aParameterValueForCache,m_aFilter,m_nMaxRows );
if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
{