services: Assign the service manager db to the lock in LockServiceDatabase.
This commit is contained in:
parent
4df06c4cfe
commit
d725626a2b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue