Initialize pointers addresses before the first goto, to avoid uninit addresses handling

CID 1206997, 1206998

svn path=/trunk/; revision=69665
This commit is contained in:
Pierre Schweitzer 2015-10-24 08:49:08 +00:00
parent a3237b1f66
commit e21fa420f0

View 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);