summaryrefslogtreecommitdiffstats
path: root/source4/lib/samba3
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/samba3')
-rw-r--r--source4/lib/samba3/samba3dump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/lib/samba3/samba3dump.c b/source4/lib/samba3/samba3dump.c
index b95fc0d4b2..6be91c0db2 100644
--- a/source4/lib/samba3/samba3dump.c
+++ b/source4/lib/samba3/samba3dump.c
@@ -86,8 +86,11 @@ static NTSTATUS print_samba3_secrets(struct samba3_secrets *secrets)
print_header("Secrets");
printf("IPC Credentials:\n");
- if (secrets->ipc_cred->username_obtained)
- printf(" User: %s\n", cli_credentials_get_username(secrets->ipc_cred));
+ if (secrets->ipc_cred->username_obtained) {
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
+ printf(" User: %s\n", cli_credentials_get_username(secrets->ipc_cred, mem_ctx));
+ talloc_free(mem_ctx);
+ }
if (secrets->ipc_cred->password_obtained)
printf(" Password: %s\n", cli_credentials_get_password(secrets->ipc_cred));