summaryrefslogtreecommitdiff
path: root/client/keytab.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/keytab.c')
-rw-r--r--client/keytab.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/keytab.c b/client/keytab.c
index 2d31a27..bdd0134 100644
--- a/client/keytab.c
+++ b/client/keytab.c
@@ -47,7 +47,11 @@ merge_keytab(krb5_context ctx, const char *newfile, const char *file)
status = krb5_kt_add_entry(ctx, old, &entry);
if (status != 0)
die_krb5(ctx, status, "cannot write to keytab %s", file);
+#ifdef HAVE_KRB5_KT_FREE_ENTRY
+ krb5_kt_free_entry(ctx, &entry);
+#else
krb5_free_keytab_entry_contents(ctx, &entry);
+#endif
}
if (status != KRB5_KT_END)
die_krb5(ctx, status, "error reading temporary keytab %s", newfile);