dbaccess/source/core/api/RowSet.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 1e1b2c563d23eb59ceea8ba07335878aab5b1386
Author: Lionel Elie Mamane <lio...@mamane.lu>
Date:   Wed Aug 6 15:33:46 2014 +0200

    Don't leak the previous cache
    
    Change-Id: I61cb1c608a7de8efc63533085e86c6c17c05f545
    Reviewed-on: https://gerrit.libreoffice.org/10793
    Reviewed-by: Lionel Elie Mamane <lio...@mamane.lu>
    Tested-by: Lionel Elie Mamane <lio...@mamane.lu>

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index e31879e..388e153 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 )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to