1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

libcli/security Use talloc_zero when making a struct security_token

This commit is contained in:
Andrew Bartlett 2010-09-11 17:00:10 +10:00
parent fdcadb5c3c
commit a02a2c3557
2 changed files with 1 additions and 7 deletions

View File

@ -157,8 +157,6 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx,
ptoken = security_token_initialise(mem_ctx);
NT_STATUS_HAVE_NO_MEMORY(ptoken);
ptoken->privilege_mask = 0;
ptoken->sids = talloc_array(ptoken, struct dom_sid, n_groupSIDs + 6 /* over-allocate */);
NT_STATUS_HAVE_NO_MEMORY(ptoken->sids);

View File

@ -31,15 +31,11 @@ struct security_token *security_token_initialise(TALLOC_CTX *mem_ctx)
{
struct security_token *st;
st = talloc(mem_ctx, struct security_token);
st = talloc_zero(mem_ctx, struct security_token);
if (!st) {
return NULL;
}
st->num_sids = 0;
st->sids = NULL;
st->privilege_mask = 0;
return st;
}