[LSASRV]
[reactos.git] / reactos / dll / win32 / lsasrv / authpackage.c
index 8122ad2..60eb2ad 100644 (file)
@@ -1029,6 +1029,9 @@ LsapAddSamGroups(
     for (i = 0; i < TokenInfo1->Groups->GroupCount; i++)
         SidArray.Sids[i + 1].SidPointer = TokenInfo1->Groups->Groups[i].Sid;
 
+    BuiltinMembership.Element = NULL;
+    AccountMembership.Element = NULL;
+
     Status = SamIConnect(NULL,
                          &ServerHandle,
                          SAM_SERVER_CONNECT | SAM_SERVER_LOOKUP_DOMAIN,
@@ -1059,7 +1062,6 @@ LsapAddSamGroups(
         goto done;
     }
 
-    BuiltinMembership.Element = NULL;
     Status = SamrGetAliasMembership(BuiltinDomainHandle,
                                     &SidArray,
                                     &BuiltinMembership);
@@ -1069,7 +1071,6 @@ LsapAddSamGroups(
         goto done;
     }
 
-    AccountMembership.Element = NULL;
     Status = SamrGetAliasMembership(AccountDomainHandle,
                                     &SidArray,
                                     &AccountMembership);