ole32: Add DebugInfo to critical sections.

Also add missing DeleteCriticalSection.
This commit is contained in:
Jan Zerebecki 2007-03-11 00:21:23 +01:00 committed by Alexandre Julliard
parent 826321bc60
commit 0f7a3811b4
2 changed files with 7 additions and 0 deletions

View File

@ -279,6 +279,9 @@ RunningObjectTableImpl_Destroy(void)
rot_entry_delete(rot_entry);
}
DEBUG_CLEAR_CRITSEC_NAME(&runningObjectTableInstance->lock);
DeleteCriticalSection(&runningObjectTableInstance->lock);
/* free the ROT structure memory */
HeapFree(GetProcessHeap(),0,runningObjectTableInstance);
runningObjectTableInstance = NULL;
@ -824,6 +827,7 @@ HRESULT WINAPI RunningObjectTableImpl_Initialize(void)
list_init(&runningObjectTableInstance->rot);
InitializeCriticalSection(&runningObjectTableInstance->lock);
DEBUG_SET_CRITSEC_NAME(&runningObjectTableInstance->lock, "RunningObjectTableImpl.lock");
return S_OK;
}

View File

@ -233,6 +233,7 @@ static ULONG WINAPI IPropertyStorage_fnRelease(
if (This->dirty)
IPropertyStorage_Commit(iface, STGC_DEFAULT);
IStream_Release(This->stm);
This->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&This->cs);
PropertyStorage_DestroyDictionaries(This);
HeapFree(GetProcessHeap(), 0, This);
@ -1978,6 +1979,7 @@ static HRESULT PropertyStorage_BaseConstruct(IStream *stm,
(*pps)->vtbl = &IPropertyStorage_Vtbl;
(*pps)->ref = 1;
InitializeCriticalSection(&(*pps)->cs);
(*pps)->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PropertyStorage_impl.cs");
(*pps)->stm = stm;
memcpy(&(*pps)->fmtid, rfmtid, sizeof((*pps)->fmtid));
(*pps)->grfMode = grfMode;
@ -1986,6 +1988,7 @@ static HRESULT PropertyStorage_BaseConstruct(IStream *stm,
if (FAILED(hr))
{
IStream_Release(stm);
(*pps)->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&(*pps)->cs);
HeapFree(GetProcessHeap(), 0, *pps);
*pps = NULL;