mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[SERVICES]
Leave the critical section when the allocation of the control packet fails. Bug spotted by hzlilx. svn path=/trunk/; revision=50994
This commit is contained in:
parent
f7049d7fb7
commit
69b1f9091e
1 changed files with 3 additions and 0 deletions
|
@ -700,7 +700,10 @@ ScmControlService(PSERVICE Service,
|
|||
HEAP_ZERO_MEMORY,
|
||||
sizeof(SCM_CONTROL_PACKET) + (TotalLength * sizeof(WCHAR)));
|
||||
if (ControlPacket == NULL)
|
||||
{
|
||||
LeaveCriticalSection(&ControlServiceCriticalSection);
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
}
|
||||
|
||||
ControlPacket->dwControl = dwControl;
|
||||
ControlPacket->dwSize = TotalLength;
|
||||
|
|
Loading…
Reference in a new issue