From e8956eb48b07a0b05f4cf2ebe89f58c7f90050d7 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Sat, 10 Mar 2007 22:08:02 +0100 Subject: [PATCH] crypt32: Add DebugInfo to critical sections. --- dlls/crypt32/context.c | 2 ++ dlls/crypt32/oid.c | 6 ++++++ dlls/crypt32/proplist.c | 2 ++ dlls/crypt32/store.c | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 96e719836e0..ab57c5709b8 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -192,6 +192,7 @@ struct ContextList *ContextList_Create( list->contextInterface = contextInterface; list->contextSize = contextSize; InitializeCriticalSection(&list->cs); + list->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ContextList.cs"); list_init(&list->contexts); } return list; @@ -303,6 +304,7 @@ void ContextList_Empty(struct ContextList *list) void ContextList_Free(struct ContextList *list) { ContextList_Empty(list); + list->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&list->cs); CryptMemFree(list); } diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 20d3b5daac2..bbad49178a9 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -75,6 +75,7 @@ struct OIDFunction static void init_function_sets(void) { InitializeCriticalSection(&funcSetCS); + funcSetCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": funcSetCS"); list_init(&funcSets); } @@ -95,9 +96,11 @@ static void free_function_sets(void) list_remove(&functionCursor->next); CryptMemFree(functionCursor); } + setCursor->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&setCursor->cs); CryptMemFree(setCursor); } + funcSetCS.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&funcSetCS); } @@ -130,6 +133,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName, if (ret->name) { InitializeCriticalSection(&ret->cs); + ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": OIDFunctionSet.cs"); list_init(&ret->functions); strcpy(ret->name, pszFuncName); list_add_tail(&funcSets, &ret->next); @@ -1178,6 +1182,7 @@ static void init_oid_info(HINSTANCE hinst) DWORD i; InitializeCriticalSection(&oidInfoCS); + oidInfoCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": oidInfoCS"); list_init(&oidInfo); for (i = 0; i < sizeof(oidInfoConstructors) / sizeof(oidInfoConstructors[0]); i++) @@ -1250,6 +1255,7 @@ static void free_oid_info(void) list_remove(&info->entry); CryptMemFree(info); } + oidInfoCS.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&oidInfoCS); } diff --git a/dlls/crypt32/proplist.c b/dlls/crypt32/proplist.c index e1d49981dbe..31cd53b6f40 100644 --- a/dlls/crypt32/proplist.c +++ b/dlls/crypt32/proplist.c @@ -47,6 +47,7 @@ PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void) if (list) { InitializeCriticalSection(&list->cs); + list->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PCONTEXT_PROPERTY_LIST->cs"); list_init(&list->properties); } return list; @@ -63,6 +64,7 @@ void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list) CryptMemFree(prop->pbData); CryptMemFree(prop); } + list->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&list->cs); CryptMemFree(list); } diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 8c8cda55164..1447d37f833 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -370,6 +370,7 @@ static void WINAPI CRYPT_CollectionCloseStore(HCERTSTORE store, DWORD dwFlags) CertCloseStore((HCERTSTORE)entry->store, dwFlags); CryptMemFree(entry); } + cs->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&cs->cs); CryptMemFree(cs); } @@ -675,6 +676,7 @@ static WINECRYPT_CERTSTORE *CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, store->hdr.crls.enumContext = CRYPT_CollectionEnumCRL; store->hdr.crls.deleteContext = CRYPT_CollectionDeleteCRL; InitializeCriticalSection(&store->cs); + store->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_COLLECTIONSTORE->cs"); list_init(&store->stores); } } @@ -1225,6 +1227,7 @@ static void WINAPI CRYPT_RegCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) CRYPT_RegFlushStore(store, FALSE); RegCloseKey(store->key); + store->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&store->cs); CryptMemFree(store); } @@ -1471,6 +1474,7 @@ static WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, regInfo->memStore = memStore; regInfo->key = key; InitializeCriticalSection(®Info->cs); + regInfo->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_REGSTOREINFO->cs"); list_init(®Info->certsToDelete); list_init(®Info->crlsToDelete); CRYPT_RegReadFromReg(regInfo); -- 2.11.4.GIT