diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-09-19 15:49:25 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-09-19 21:40:11 +0200 |
commit | c9b1cb5ae36b1057fb185945b52d3e45c5436bb6 (patch) | |
tree | c26da964820a3ded0e0599ac103d160fb6ad8388 /dbaccess | |
parent | Page Break: draw a dashed line using the header/footer separator code (diff) | |
download | core-c9b1cb5ae36b1057fb185945b52d3e45c5436bb6.tar.gz core-c9b1cb5ae36b1057fb185945b52d3e45c5436bb6.zip |
Avoid premature deletion of objects in ODatabaseContext::m_aDatabaseObjects.
Access of deleted objects found with valgrind/memcheck of dbaccess/qa/unoapi.
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasecontext.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 22f77a71f6fb..f542d2b75477 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -291,7 +291,10 @@ void ODatabaseContext::disposing() ++aIter ) { - aIter->second->dispose(); + rtl::Reference< ODatabaseModelImpl > obj(aIter->second); + // make sure obj is acquired and does not delete itself from within + // dispose() + obj->dispose(); } m_aDatabaseObjects.clear(); } |