diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-02-16 15:29:27 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-02-16 15:29:27 +0000 |
commit | 732bd469091eba7937fed6adc009a342ab6e733a (patch) | |
tree | f81ac30d3acfd2f6df2fe5e4d4d2efd223cbc2fc /cppu/source/uno | |
parent | 8ba444e6838f92559c7b3c086d9de84b8d0c315a (diff) |
potential deadlock fix
Diffstat (limited to 'cppu/source/uno')
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index 5fc97bf9d33f..7e336fd8a10e 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -2,9 +2,9 @@ * * $RCSfile: lbenv.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: pliao $ $Date: 2001-02-07 03:40:08 $ + * last change: $Author: dbo $ $Date: 2001-02-16 16:29:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -508,11 +508,12 @@ static void SAL_CALL defenv_acquire( uno_Environment * pEnv ) static void SAL_CALL defenv_release( uno_Environment * pEnv ) throw () { - MutexGuard aGuard( getEnvironmentsData().aMutex ); + ClearableMutexGuard aGuard( getEnvironmentsData().aMutex ); if (! osl_decrementInterlockedCount( &((uno_DefaultEnvironment *)pEnv)->nRef )) { getEnvironmentsData().revokeEnvironment( pEnv ); - delete (uno_DefaultEnvironment *)pEnv; + aGuard.clear(); + delete (uno_DefaultEnvironment *)pEnv; // invokes dispose callback... } } //-------------------------------------------------------------------------------------------------- |