ucb: webdav-curl: tdf#101094 (26): Fix possible early relase of cache mutex

[ port of commit 6431e91eca9e44684066a32ed3d6411509dac781 ]

Change-Id: I90391c38bf9d0f4acf68ce29b2382ad855aa56ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123480
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index a786435..fd4cf22 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -100,7 +100,7 @@ bool DAVOptionsCache::getDAVOptions( const OUString & rURL, DAVOptions & rDAVOpt
        if ( (*it).second.getStaleTime() < t1.Seconds )
        {
            // if stale, remove from cache, do not restore
            removeDAVOptions( rURL );
            m_aTheCache.erase( it );
            return false;
            // return false instead
        }