diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-26 08:48:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-26 13:39:32 +0200 |
commit | eb227657d91c94f151434434e31087ae74efdd24 (patch) | |
tree | 33c80773c328c4b269b7435b0c51d315aa518c82 /basctl | |
parent | 27fc6242c7153fcc3f41e38cc2ea649a3fe0c4cf (diff) |
cid#1608414 Double lock
since:
commit f3e127217d8daa443b8eda52ac4810e375cc7d63
CommitDate: Wed May 10 13:28:09 2023 +0200
use comphelper::WeakComponentImplHelper in DocumentEventNotifier::Impl
problem:
108 std::unique_lock aGuard(m_aMutex);
109 if ( !impl_isDisposed_nothrow(aGuard) )
110 {
111 acquire();
CID 1608414: (#1 of 1): Double lock (LOCK)
4. double_lock: dispose locks this->m_aMutex while it is locked.[show details]
112 dispose();
/include/comphelper/compbase.hxx
73 virtual void SAL_CALL dispose() noexcept final override
74 {
1. lock: dispose locks this->m_aMutex.[show details]
75 WeakComponentImplHelperBase::dispose();
/comphelper/source/misc/compbase.cxx
20 void SAL_CALL WeakComponentImplHelperBase::dispose()
21 {
1. lock: unique_lock locks this->m_aMutex.
22 std::unique_lock aGuard(m_aMutex);
Change-Id: Ibd9dc0564adf86c6409794f584a743aecd9d36e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173970
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/doceventnotifier.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx index 254c719bb5cc..9d408d7f967a 100644 --- a/basctl/source/basicide/doceventnotifier.cxx +++ b/basctl/source/basicide/doceventnotifier.cxx @@ -109,6 +109,7 @@ namespace basctl if ( !impl_isDisposed_nothrow(aGuard) ) { acquire(); + aGuard.unlock(); // dispose locks m_aMutex dispose(); } } |