summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_nttoken.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c
index f81191af58..774ef498b7 100644
--- a/source3/lib/util_nttoken.c
+++ b/source3/lib/util_nttoken.c
@@ -38,14 +38,12 @@ NT_USER_TOKEN *dup_nt_token(TALLOC_CTX *mem_ctx, const NT_USER_TOKEN *ptoken)
if (!ptoken)
return NULL;
- token = TALLOC_P(mem_ctx, NT_USER_TOKEN);
+ token = TALLOC_ZERO_P(mem_ctx, NT_USER_TOKEN);
if (token == NULL) {
DEBUG(0, ("talloc failed\n"));
return NULL;
}
- ZERO_STRUCTP(token);
-
if (ptoken->user_sids && ptoken->num_sids) {
token->user_sids = (DOM_SID *)talloc_memdup(
token, ptoken->user_sids, sizeof(DOM_SID) * ptoken->num_sids );