From: Volker Lendecke Date: Thu, 8 May 2008 09:49:14 +0000 (+0200) Subject: Use TALLOC_ZERO_P instead of separate ZERO_STRUCTP in dup_nt_token X-Git-Tag: samba-4.0.0alpha6~801^2~1406 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac9c7de9d0a3b41a0c76c6e9527c68187914a07d;p=thirdparty%2Fsamba.git Use TALLOC_ZERO_P instead of separate ZERO_STRUCTP in dup_nt_token (This used to be commit 124a2c71852f39fcfe62ea19a5a8d25638d47400) --- diff --git a/source3/lib/util_nttoken.c b/source3/lib/util_nttoken.c index f81191af58a..774ef498b7f 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 );