ucb/source/ucp/webdav-curl/SerfLockStore.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 8980b0e5d443f45404b86dbf592ebe2ffb6adc24 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Aug 7 11:41:04 2025 +0100 Commit: Christian Lohmaier <[email protected]> CommitDate: Wed Nov 5 12:19:52 2025 +0100 Related: tdf#168672 ; cid#1642989 Wait without held lock restore the lock at the end of SerfLockStore::stopTicker SerfLockStore::removeLockImpl calls this, and that is called by SerfLockStore::refreshLocks in a loop, so if it was unlocked at the end of the first loop, then its still unlocked on a 2nd loop. Probably doesn't matter as there's only a 2nd unlock attempt if m_aLockInfoMap.empty() which presumably can only happen once. Change-Id: Iede91b1b4ef9368bcf4e62cb85bf5a0c745e0ba7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189058 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins (cherry picked from commit 3f3aed00458d64bf32f5faa25c88f959430dea3a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193403 Reviewed-by: Xisco Fauli <[email protected]> Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193427 Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx index c12bdfedf6de..c367f1445c54 100644 --- a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx +++ b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx @@ -93,7 +93,7 @@ SerfLockStore::~SerfLockStore() { std::unique_lock aGuard(m_aMutex); stopTicker(aGuard); - aGuard.lock(); // actually no threads should even try to access members now + assert(aGuard.owns_lock()); // actually no threads should even try to access members now // release active locks, if any. SAL_WARN_IF( !m_aLockInfoMap.empty(), "ucb.ucp.webdav", @@ -133,6 +133,8 @@ void SerfLockStore::stopTicker(std::unique_lock<std::mutex> & rGuard) { pTickerThread->join(); // without m_aMutex locked (to prevent deadlock) } + + rGuard.lock(); } bool SerfLockStore::joinThreads()
