diff --git a/reactos/dll/win32/ntmarta/ntmarta.c b/reactos/dll/win32/ntmarta/ntmarta.c index 81070c3f256..fa164250039 100644 --- a/reactos/dll/win32/ntmarta/ntmarta.c +++ b/reactos/dll/win32/ntmarta/ntmarta.c @@ -1333,6 +1333,10 @@ AccRewriteSetEntriesInAcl(ULONG cCountOfExplicitEntries, LocalFree((HLOCAL)pSid1); } + /* Succeed, if no ACL needs to be allocated */ + if (SizeInformation.AclBytesInUse == 0) + goto Cleanup; + /* OK, now create the new ACL */ DPRINT("Allocating %u bytes for the new ACL\n", SizeInformation.AclBytesInUse); pNew = (PACL)LocalAlloc(LMEM_FIXED, SizeInformation.AclBytesInUse);