summaryrefslogtreecommitdiff
path: root/source4/auth/credentials
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-06 21:39:56 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:33 +0100
commit997688671083aa32f3b985d8ab14eb7a761de525 (patch)
tree6025723310e707e284fcb869ad26307972768226 /source4/auth/credentials
parent41db2ab12cea20b271d690be554ab8e6095c2b4e (diff)
downloadsamba-997688671083aa32f3b985d8ab14eb7a761de525.tar.gz
samba-997688671083aa32f3b985d8ab14eb7a761de525.tar.bz2
samba-997688671083aa32f3b985d8ab14eb7a761de525.zip
r26320: Clean up properly after error.
(This used to be commit 9fdfe1ad8c7b76e521a683b4afa7b324d15d55b5)
Diffstat (limited to 'source4/auth/credentials')
-rw-r--r--source4/auth/credentials/credentials.i4
-rw-r--r--source4/auth/credentials/credentials_krb5.c1
2 files changed, 2 insertions, 3 deletions
diff --git a/source4/auth/credentials/credentials.i b/source4/auth/credentials/credentials.i
index 565221c466..456ea75519 100644
--- a/source4/auth/credentials/credentials.i
+++ b/source4/auth/credentials/credentials.i
@@ -50,9 +50,7 @@ typedef struct cli_credentials {
cli_credentials() {
return cli_credentials_init(NULL);
}
- ~cli_credentials() {
- talloc_free($self);
- }
+ ~cli_credentials() { talloc_free($self); }
/* username */
const char *get_username(void);
bool set_username(const char *value,
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index fe71d98b43..cfdc2e3f5a 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -41,6 +41,7 @@ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
ret = smb_krb5_init_context(cred, cli_credentials_get_event_context(cred),
lp_ctx, &cred->smb_krb5_context);
if (ret) {
+ cred->smb_krb5_context = NULL;
return ret;
}
*smb_krb5_context = cred->smb_krb5_context;