summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-04 11:10:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:34 -0500
commit8cd92242b9f247630e17d396014f6f671f577f4c (patch)
treeaccc1acc8c1b6f9ea61bcfa737bf3deec2db5b99
parent791db4bf72f282840a7bfefa2a3ccf9b3191a6e6 (diff)
downloadsamba-8cd92242b9f247630e17d396014f6f671f577f4c.tar.gz
samba-8cd92242b9f247630e17d396014f6f671f577f4c.tar.bz2
samba-8cd92242b9f247630e17d396014f6f671f577f4c.zip
r7269: talloc_steal() is preferred where possible, as it can't fail and does
not have some of the issues of talloc_reference(). Andrew Bartlett (This used to be commit 2fb413355a7cd7b5cee02237d2fbff91381435e5)
-rw-r--r--source4/auth/auth_sam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 24007d1eb7..a4dd8984dd 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -431,9 +431,9 @@ static NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx, void *sam_ctx,
server_info->n_domain_groups = group_ret;
server_info->domain_groups = groupSIDs;
- server_info->account_name = talloc_reference(server_info, samdb_result_string(msgs[0], "sAMAccountName", NULL));
+ server_info->account_name = talloc_steal(server_info, samdb_result_string(msgs[0], "sAMAccountName", NULL));
- server_info->domain_name = talloc_reference(server_info, samdb_result_string(msgs_domain[0], "nETBIOSName", NULL));
+ server_info->domain_name = talloc_steal(server_info, samdb_result_string(msgs_domain[0], "nETBIOSName", NULL));
str = samdb_result_string(msgs[0], "displayName", "");
server_info->full_name = talloc_strdup(server_info, str);