git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4bed3a
)
Use TALLOC_ZERO_P instead of separate ZERO_STRUCTP in dup_nt_token
author
Volker Lendecke
<vl@samba.org>
Thu, 8 May 2008 09:49:14 +0000
(11:49 +0200)
committer
Volker Lendecke
<vl@samba.org>
Sat, 10 May 2008 09:17:00 +0000
(11:17 +0200)
source/lib/util_nttoken.c
patch
|
blob
|
history
diff --git
a/source/lib/util_nttoken.c
b/source/lib/util_nttoken.c
index f81191af58a58039cd0049614a8522560d60cc96..774ef498b7f670ef94f17e66928ef3f6b47f8722 100644
(file)
--- a/
source/lib/util_nttoken.c
+++ b/
source/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 );