cid#1608414 Double lock
since:
commit f3e127217d
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>
This commit is contained in:
parent
27fc6242c7
commit
eb227657d9
1 changed files with 1 additions and 0 deletions
|
@ -109,6 +109,7 @@ namespace basctl
|
|||
if ( !impl_isDisposed_nothrow(aGuard) )
|
||||
{
|
||||
acquire();
|
||||
aGuard.unlock(); // dispose locks m_aMutex
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue