Commit d725626a authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

services: Assign the service manager db to the lock in LockServiceDatabase.

parent 4df06c4c
......@@ -897,6 +897,7 @@ DWORD svcctl_LockServiceDatabase(
SC_RPC_LOCK *phLock)
{
struct sc_manager_handle *manager;
struct sc_lock *lock;
DWORD err;
WINE_TRACE("(%p, %p)\n", hSCManager, phLock);
......@@ -908,13 +909,16 @@ DWORD svcctl_LockServiceDatabase(
if (err != ERROR_SUCCESS)
return err;
*phLock = HeapAlloc(GetProcessHeap(), 0, sizeof(struct sc_lock));
if (!*phLock)
lock = HeapAlloc(GetProcessHeap(), 0, sizeof(struct sc_lock));
if (!lock)
{
scmdatabase_unlock_startup(manager->db);
return ERROR_NOT_ENOUGH_SERVER_MEMORY;
}
lock->db = manager->db;
*phLock = lock;
return ERROR_SUCCESS;
}
......
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