Clear the memory after we know that the buffer was allocated.
Modified: trunk/reactos/ntoskrnl/se/semgr.c
_____
Modified: trunk/reactos/ntoskrnl/se/semgr.c
--- trunk/reactos/ntoskrnl/se/semgr.c 2005-08-11 20:35:00 UTC (rev
17307)
+++ trunk/reactos/ntoskrnl/se/semgr.c 2005-08-11 20:37:09 UTC (rev
17308)
@@ -719,8 +719,6 @@
Descriptor = ExAllocatePool(PagedPool,
Length);
- RtlZeroMemory( Descriptor, Length );
-
if (Descriptor == NULL)
{
DPRINT1("ExAlloctePool() failed\n");
@@ -728,6 +726,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
+ RtlZeroMemory( Descriptor, Length );
RtlCreateSecurityDescriptor(Descriptor,
SECURITY_DESCRIPTOR_REVISION);
Show replies by date