Commit e8956eb4 authored by Jan Zerebecki's avatar Jan Zerebecki Committed by Alexandre Julliard

crypt32: Add DebugInfo to critical sections.

parent 373fcd00
...@@ -192,6 +192,7 @@ struct ContextList *ContextList_Create( ...@@ -192,6 +192,7 @@ struct ContextList *ContextList_Create(
list->contextInterface = contextInterface; list->contextInterface = contextInterface;
list->contextSize = contextSize; list->contextSize = contextSize;
InitializeCriticalSection(&list->cs); InitializeCriticalSection(&list->cs);
list->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ContextList.cs");
list_init(&list->contexts); list_init(&list->contexts);
} }
return list; return list;
...@@ -303,6 +304,7 @@ void ContextList_Empty(struct ContextList *list) ...@@ -303,6 +304,7 @@ void ContextList_Empty(struct ContextList *list)
void ContextList_Free(struct ContextList *list) void ContextList_Free(struct ContextList *list)
{ {
ContextList_Empty(list); ContextList_Empty(list);
list->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&list->cs); DeleteCriticalSection(&list->cs);
CryptMemFree(list); CryptMemFree(list);
} }
...@@ -75,6 +75,7 @@ struct OIDFunction ...@@ -75,6 +75,7 @@ struct OIDFunction
static void init_function_sets(void) static void init_function_sets(void)
{ {
InitializeCriticalSection(&funcSetCS); InitializeCriticalSection(&funcSetCS);
funcSetCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": funcSetCS");
list_init(&funcSets); list_init(&funcSets);
} }
...@@ -95,9 +96,11 @@ static void free_function_sets(void) ...@@ -95,9 +96,11 @@ static void free_function_sets(void)
list_remove(&functionCursor->next); list_remove(&functionCursor->next);
CryptMemFree(functionCursor); CryptMemFree(functionCursor);
} }
setCursor->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&setCursor->cs); DeleteCriticalSection(&setCursor->cs);
CryptMemFree(setCursor); CryptMemFree(setCursor);
} }
funcSetCS.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&funcSetCS); DeleteCriticalSection(&funcSetCS);
} }
...@@ -130,6 +133,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName, ...@@ -130,6 +133,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
if (ret->name) if (ret->name)
{ {
InitializeCriticalSection(&ret->cs); InitializeCriticalSection(&ret->cs);
ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": OIDFunctionSet.cs");
list_init(&ret->functions); list_init(&ret->functions);
strcpy(ret->name, pszFuncName); strcpy(ret->name, pszFuncName);
list_add_tail(&funcSets, &ret->next); list_add_tail(&funcSets, &ret->next);
...@@ -1178,6 +1182,7 @@ static void init_oid_info(HINSTANCE hinst) ...@@ -1178,6 +1182,7 @@ static void init_oid_info(HINSTANCE hinst)
DWORD i; DWORD i;
InitializeCriticalSection(&oidInfoCS); InitializeCriticalSection(&oidInfoCS);
oidInfoCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": oidInfoCS");
list_init(&oidInfo); list_init(&oidInfo);
for (i = 0; i < sizeof(oidInfoConstructors) / for (i = 0; i < sizeof(oidInfoConstructors) /
sizeof(oidInfoConstructors[0]); i++) sizeof(oidInfoConstructors[0]); i++)
...@@ -1250,6 +1255,7 @@ static void free_oid_info(void) ...@@ -1250,6 +1255,7 @@ static void free_oid_info(void)
list_remove(&info->entry); list_remove(&info->entry);
CryptMemFree(info); CryptMemFree(info);
} }
oidInfoCS.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&oidInfoCS); DeleteCriticalSection(&oidInfoCS);
} }
......
...@@ -47,6 +47,7 @@ PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void) ...@@ -47,6 +47,7 @@ PCONTEXT_PROPERTY_LIST ContextPropertyList_Create(void)
if (list) if (list)
{ {
InitializeCriticalSection(&list->cs); InitializeCriticalSection(&list->cs);
list->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PCONTEXT_PROPERTY_LIST->cs");
list_init(&list->properties); list_init(&list->properties);
} }
return list; return list;
...@@ -63,6 +64,7 @@ void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list) ...@@ -63,6 +64,7 @@ void ContextPropertyList_Free(PCONTEXT_PROPERTY_LIST list)
CryptMemFree(prop->pbData); CryptMemFree(prop->pbData);
CryptMemFree(prop); CryptMemFree(prop);
} }
list->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&list->cs); DeleteCriticalSection(&list->cs);
CryptMemFree(list); CryptMemFree(list);
} }
......
...@@ -370,6 +370,7 @@ static void WINAPI CRYPT_CollectionCloseStore(HCERTSTORE store, DWORD dwFlags) ...@@ -370,6 +370,7 @@ static void WINAPI CRYPT_CollectionCloseStore(HCERTSTORE store, DWORD dwFlags)
CertCloseStore((HCERTSTORE)entry->store, dwFlags); CertCloseStore((HCERTSTORE)entry->store, dwFlags);
CryptMemFree(entry); CryptMemFree(entry);
} }
cs->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&cs->cs); DeleteCriticalSection(&cs->cs);
CryptMemFree(cs); CryptMemFree(cs);
} }
...@@ -675,6 +676,7 @@ static WINECRYPT_CERTSTORE *CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, ...@@ -675,6 +676,7 @@ static WINECRYPT_CERTSTORE *CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv,
store->hdr.crls.enumContext = CRYPT_CollectionEnumCRL; store->hdr.crls.enumContext = CRYPT_CollectionEnumCRL;
store->hdr.crls.deleteContext = CRYPT_CollectionDeleteCRL; store->hdr.crls.deleteContext = CRYPT_CollectionDeleteCRL;
InitializeCriticalSection(&store->cs); InitializeCriticalSection(&store->cs);
store->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_COLLECTIONSTORE->cs");
list_init(&store->stores); list_init(&store->stores);
} }
} }
...@@ -1225,6 +1227,7 @@ static void WINAPI CRYPT_RegCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) ...@@ -1225,6 +1227,7 @@ static void WINAPI CRYPT_RegCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
CRYPT_RegFlushStore(store, FALSE); CRYPT_RegFlushStore(store, FALSE);
RegCloseKey(store->key); RegCloseKey(store->key);
store->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&store->cs); DeleteCriticalSection(&store->cs);
CryptMemFree(store); CryptMemFree(store);
} }
...@@ -1471,6 +1474,7 @@ static WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, ...@@ -1471,6 +1474,7 @@ static WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv,
regInfo->memStore = memStore; regInfo->memStore = memStore;
regInfo->key = key; regInfo->key = key;
InitializeCriticalSection(&regInfo->cs); InitializeCriticalSection(&regInfo->cs);
regInfo->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_REGSTOREINFO->cs");
list_init(&regInfo->certsToDelete); list_init(&regInfo->certsToDelete);
list_init(&regInfo->crlsToDelete); list_init(&regInfo->crlsToDelete);
CRYPT_RegReadFromReg(regInfo); CRYPT_RegReadFromReg(regInfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment