Leave the critical section when the allocation of the control packet fails.
Bug spotted by hzlilx.
svn path=/trunk/; revision=50994
HEAP_ZERO_MEMORY,
sizeof(SCM_CONTROL_PACKET) + (TotalLength * sizeof(WCHAR)));
if (ControlPacket == NULL)
HEAP_ZERO_MEMORY,
sizeof(SCM_CONTROL_PACKET) + (TotalLength * sizeof(WCHAR)));
if (ControlPacket == NULL)
+ {
+ LeaveCriticalSection(&ControlServiceCriticalSection);
return ERROR_NOT_ENOUGH_MEMORY;
return ERROR_NOT_ENOUGH_MEMORY;
ControlPacket->dwControl = dwControl;
ControlPacket->dwSize = TotalLength;
ControlPacket->dwControl = dwControl;
ControlPacket->dwSize = TotalLength;