summaryrefslogtreecommitdiff
path: root/source3/libads/kerberos.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libads/kerberos.c')
-rw-r--r--source3/libads/kerberos.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 56d7b061a1..52cb975a6c 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -511,13 +511,13 @@ char *kerberos_get_default_realm_from_ccache( void )
out:
- if (princ) {
- krb5_free_principal(ctx, princ);
- }
- if (cc) {
- krb5_cc_close(ctx, cc);
- }
if (ctx) {
+ if (princ) {
+ krb5_free_principal(ctx, princ);
+ }
+ if (cc) {
+ krb5_cc_close(ctx, cc);
+ }
krb5_free_context(ctx);
}