From ac9c7de9d0a3b41a0c76c6e9527c68187914a07d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 8 May 2008 11:49:14 +0200 Subject: Use TALLOC_ZERO_P instead of separate ZERO_STRUCTP in dup_nt_token (This used to be commit 124a2c71852f39fcfe62ea19a5a8d25638d47400) --- source3/lib/util_nttoken.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source3/lib') 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 ); -- cgit