diff --git a/reactos/ntoskrnl/se/semgr.c b/reactos/ntoskrnl/se/semgr.c index b2af8a76a3c..ac89f3c60e8 100644 --- a/reactos/ntoskrnl/se/semgr.c +++ b/reactos/ntoskrnl/se/semgr.c @@ -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);