From 0f7a3811b4cdf818c04e5debd89390522410b43d Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Sun, 11 Mar 2007 00:21:23 +0100 Subject: [PATCH] ole32: Add DebugInfo to critical sections. Also add missing DeleteCriticalSection. --- dlls/ole32/moniker.c | 4 ++++ dlls/ole32/stg_prop.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/dlls/ole32/moniker.c b/dlls/ole32/moniker.c index c8999185f13..0cb35faab4d 100644 --- a/dlls/ole32/moniker.c +++ b/dlls/ole32/moniker.c @@ -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; } diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index a4be7b7caa8..45c760e65a3 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -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;