summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-05-03 07:33:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:46 -0500
commit7b9d6ac23e1a7d8136fffd2e3977b09a815da65a (patch)
treec224433cb1cbc7ff17bd03aca1b564ebeefe15a2 /source3/passdb
parent114067ced1d301a3c8b67aee0af0eab771d44dd4 (diff)
downloadsamba-7b9d6ac23e1a7d8136fffd2e3977b09a815da65a.tar.gz
samba-7b9d6ac23e1a7d8136fffd2e3977b09a815da65a.tar.bz2
samba-7b9d6ac23e1a7d8136fffd2e3977b09a815da65a.zip
r6595: This is Volkers new-talloc patch. Just got the go-ahead from
Volker to commit. Woo Hoo ! Jeremy. (This used to be commit 316df944a456f150944761dab34add5e8c4ab699)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/secrets.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index c7ff2f80b0..d1dcc694e8 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -640,7 +640,8 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, unsigned in
memcpy(&(dom->sid), &(pass->domain_sid), sizeof(dom->sid));
/* copy unicode domain name */
- dom->name = talloc_strdup_w(ctx, pass->uni_name);
+ dom->name = TALLOC_MEMDUP(ctx, pass->uni_name,
+ (strlen_w(pass->uni_name) + 1) * sizeof(smb_ucs2_t));
(*domains)[idx - start_idx] = dom;