git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c406bf6
)
auth/credentials: Add NULL check to free_dccache()
author
Andreas Schneider
<asn@samba.org>
Sat, 1 Oct 2016 09:27:54 +0000
(11:27 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 20 Dec 2016 12:52:09 +0000
(13:52 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
auth/credentials/credentials_krb5.c
patch
|
blob
|
history
diff --git
a/auth/credentials/credentials_krb5.c
b/auth/credentials/credentials_krb5.c
index 7b1470a96a9f295573307909d7f689fbe4958aae..ca62e30ef73779163ef02d5b4b279ebcfa17f3e4 100644
(file)
--- a/
auth/credentials/credentials_krb5.c
+++ b/
auth/credentials/credentials_krb5.c
@@
-52,8
+52,13
@@
static int free_mccache(struct ccache_container *ccc)
}
/* Free a disk-based ccache */
-static int free_dccache(struct ccache_container *ccc) {
- krb5_cc_close(ccc->smb_krb5_context->krb5_context, ccc->ccache);
+static int free_dccache(struct ccache_container *ccc)
+{
+ if (ccc->ccache != NULL) {
+ krb5_cc_close(ccc->smb_krb5_context->krb5_context,
+ ccc->ccache);
+ ccc->ccache = NULL;
+ }
return 0;
}