summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-05-08 11:49:14 +0200
committerVolker Lendecke <vl@samba.org>2008-05-10 11:17:00 +0200
commitac9c7de9d0a3b41a0c76c6e9527c68187914a07d (patch)
treea833e1f618e90fd0bbaca254e3e3f0de8f12cdb1 /source3/lib
parente2b9ac714b0f7aeece4ebe8772b7f8380356818d (diff)
downloadsamba-ac9c7de9d0a3b41a0c76c6e9527c68187914a07d.tar.gz
samba-ac9c7de9d0a3b41a0c76c6e9527c68187914a07d.tar.bz2
samba-ac9c7de9d0a3b41a0c76c6e9527c68187914a07d.zip
Use TALLOC_ZERO_P instead of separate ZERO_STRUCTP in dup_nt_token
(This used to be commit 124a2c71852f39fcfe62ea19a5a8d25638d47400)
Diffstat (limited to 'source3/lib')
-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 );