Commit 97ab9cc7 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

services: Give a name to the scmdatabase critical section.

parent 39e12238
......@@ -405,6 +405,7 @@ static DWORD scmdatabase_create(struct scmdatabase **db)
list_init(&(*db)->services);
InitializeCriticalSection(&(*db)->cs);
(*db)->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": scmdatabase");
err = RegCreateKeyExW(HKEY_LOCAL_MACHINE, SZ_SERVICES_KEY, 0, 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)
{
RegCloseKey(db->root_key);
db->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&db->cs);
HeapFree(GetProcessHeap(), 0, db);
}
......
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