summaryrefslogtreecommitdiffstats
path: root/source3/auth
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-02-28 17:16:27 +0100
committerGünther Deschner <gd@samba.org>2014-03-13 15:08:26 +0100
commit6030fac3d15ad851b8786509c402c68f12dfd653 (patch)
tree517abdc326db18da4f2934bcbdd89be13c52a208 /source3/auth
parent4081c29d3bb5c21daa70dd498aa709e335bcd524 (diff)
downloadsamba-6030fac3d15ad851b8786509c402c68f12dfd653.tar.gz
samba-6030fac3d15ad851b8786509c402c68f12dfd653.tar.xz
samba-6030fac3d15ad851b8786509c402c68f12dfd653.zip
s3-auth: Steal the memory to avoid duplication.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/server_info_sam.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source3/auth/server_info_sam.c b/source3/auth/server_info_sam.c
index 6cd791e009..fef60c2fbd 100644
--- a/source3/auth/server_info_sam.c
+++ b/source3/auth/server_info_sam.c
@@ -96,11 +96,7 @@ NTSTATUS make_server_info_sam(TALLOC_CTX *mem_ctx,
goto out;
}
- server_info->unix_name = talloc_strdup(server_info, pwd->pw_name);
- if (server_info->unix_name == NULL) {
- status = NT_STATUS_NO_MEMORY;
- goto out;
- }
+ server_info->unix_name = talloc_steal(server_info, pwd->pw_name);
server_info->utok.gid = pwd->pw_gid;
server_info->utok.uid = pwd->pw_uid;