summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/credentials.h2
-rw-r--r--source4/auth/credentials/credentials_krb5.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/source4/auth/credentials/credentials.h b/source4/auth/credentials/credentials.h
index 6c077c9bec..33de8341c7 100644
--- a/source4/auth/credentials/credentials.h
+++ b/source4/auth/credentials/credentials.h
@@ -76,7 +76,7 @@ struct cli_credentials {
const char *domain;
const char *realm;
const char *principal;
- const char *salt_principal;
+ char *salt_principal;
const char *bind_dn;
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index e04b7f5926..d8ce0e58e2 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -798,6 +798,7 @@ const char *cli_credentials_get_salt_principal(struct cli_credentials *cred)
_PUBLIC_ void cli_credentials_set_salt_principal(struct cli_credentials *cred, const char *principal)
{
+ talloc_free(cred->salt_principal);
cred->salt_principal = talloc_strdup(cred, principal);
}