services: Give a name to the scmdatabase critical section.
This commit is contained in:
parent
39e12238e9
commit
97ab9cc7e5
|
@ -405,6 +405,7 @@ static DWORD scmdatabase_create(struct scmdatabase **db)
|
||||||
list_init(&(*db)->services);
|
list_init(&(*db)->services);
|
||||||
|
|
||||||
InitializeCriticalSection(&(*db)->cs);
|
InitializeCriticalSection(&(*db)->cs);
|
||||||
|
(*db)->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": scmdatabase");
|
||||||
|
|
||||||
err = RegCreateKeyExW(HKEY_LOCAL_MACHINE, SZ_SERVICES_KEY, 0, NULL,
|
err = RegCreateKeyExW(HKEY_LOCAL_MACHINE, SZ_SERVICES_KEY, 0, NULL,
|
||||||
REG_OPTION_NON_VOLATILE, MAXIMUM_ALLOWED, NULL,
|
REG_OPTION_NON_VOLATILE, MAXIMUM_ALLOWED, NULL,
|
||||||
|
@ -418,6 +419,7 @@ static DWORD scmdatabase_create(struct scmdatabase **db)
|
||||||
static void scmdatabase_destroy(struct scmdatabase *db)
|
static void scmdatabase_destroy(struct scmdatabase *db)
|
||||||
{
|
{
|
||||||
RegCloseKey(db->root_key);
|
RegCloseKey(db->root_key);
|
||||||
|
db->cs.DebugInfo->Spare[0] = 0;
|
||||||
DeleteCriticalSection(&db->cs);
|
DeleteCriticalSection(&db->cs);
|
||||||
HeapFree(GetProcessHeap(), 0, db);
|
HeapFree(GetProcessHeap(), 0, db);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue