Clear the memory after we know that the buffer was allocated.

svn path=/trunk/; revision=17308
This commit is contained in:
Hartmut Birr 2005-08-11 20:37:09 +00:00
parent 20731f1883
commit d921a7ca15

View file

@ -719,8 +719,6 @@ SeAssignSecurity(PSECURITY_DESCRIPTOR ParentDescriptor OPTIONAL,
Descriptor = ExAllocatePool(PagedPool,
Length);
RtlZeroMemory( Descriptor, Length );
if (Descriptor == NULL)
{
DPRINT1("ExAlloctePool() failed\n");
@ -728,6 +726,7 @@ SeAssignSecurity(PSECURITY_DESCRIPTOR ParentDescriptor OPTIONAL,
return STATUS_INSUFFICIENT_RESOURCES;
}
RtlZeroMemory( Descriptor, Length );
RtlCreateSecurityDescriptor(Descriptor,
SECURITY_DESCRIPTOR_REVISION);