Hello;
FWIW, I have looked at i126669 and Coverity confirms there is a bug there.
CID 440168 (#1 of 1): Dereference after null check (FORWARD_NULL)9.
var_deref_model: Passing null pointer "&pProfile->m_AccessLock" to
function "pthread_mutex_unlock(pthread_mutex_t *)", which dereferences it.
I suggest taking pthread_mutex_unlock outside the "if".
I am attaching a patch: CC'd to orcmid jic the list rejects it.
Of course it needs testing and you have to check the windows code too.
Pedro.
Index: main/sal/osl/unx/profile.c
===================================================================
--- main/sal/osl/unx/profile.c (revision 1732991)
+++ main/sal/osl/unx/profile.c (working copy)
@@ -317,12 +317,15 @@
if ( pProfile == 0 )
{
- pthread_mutex_unlock(&(pProfile->m_AccessLock));
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_closeProfile [pProfile==0]\n");
#endif
return sal_False;
}
+ else
+ {
+ pthread_mutex_unlock(&(pProfile->m_AccessLock));
+ }
if (pProfile->m_pFile != NULL)
closeFileImpl(pProfile->m_pFile,pProfile->m_Flags);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]