summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-11 17:00:10 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:14 +1000
commita02a2c3557928e507d1220303d9a3f79e8c46bb1 (patch)
tree3a02bc933d0c2fca5b678a2130a053497f0f5eaa
parentfdcadb5c3c2e3de1e2d1755653a9d02ccb548db8 (diff)
downloadsamba-a02a2c3557928e507d1220303d9a3f79e8c46bb1.tar.gz
samba-a02a2c3557928e507d1220303d9a3f79e8c46bb1.tar.bz2
samba-a02a2c3557928e507d1220303d9a3f79e8c46bb1.zip
libcli/security Use talloc_zero when making a struct security_token
-rw-r--r--source4/dsdb/samdb/samdb.c2
-rw-r--r--source4/libcli/security/security_token.c6
2 files changed, 1 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index ddcd0d2d12..32698ea412 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -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);
diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c
index 42f157aac6..9d37475c7a 100644
--- a/source4/libcli/security/security_token.c
+++ b/source4/libcli/security/security_token.c
@@ -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;
}