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(
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);
}
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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(&regInfo->cs);
regInfo->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_REGSTOREINFO->cs");
list_init(&regInfo->certsToDelete);
list_init(&regInfo->crlsToDelete);
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