summaryrefslogtreecommitdiff
path: root/source3/auth/auth_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth/auth_server.c')
-rw-r--r--source3/auth/auth_server.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 4ce0336ccc..ac757d5a35 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -429,14 +429,15 @@ use this machine as the password server.\n"));
cli_ulogoff(cli);
if (NT_STATUS_IS_OK(nt_status)) {
- fstring real_username;
- struct passwd *pass;
+ char *real_username = NULL;
+ struct passwd *pass = NULL;
- if ( (pass = smb_getpwnam( NULL, user_info->mapped.account_name,
- real_username, True )) != NULL )
+ if ( (pass = smb_getpwnam(talloc_tos(), user_info->mapped.account_name,
+ &real_username, True )) != NULL )
{
nt_status = make_server_info_pw(server_info, pass->pw_name, pass);
TALLOC_FREE(pass);
+ TALLOC_FREE(real_username);
}
else
{