From 84ed3d7a7ca4765c04ffd4b0b04a3fd5aff253a7 Mon Sep 17 00:00:00 2001 From: "Jacques A. Vidrine" Date: Wed, 5 Dec 2001 14:41:47 +0000 Subject: [PATCH] Fix a bug where kstash crashes if there is no krb5.conf git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10799 ec53bebd-3082-4978-b11e-865c3cabbd6b --- ChangeLog | 5 +++++ lib/hdb/mkey.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 805e5097b..746195c39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 Jacques Vidrine + + * lib/hdb/mkey.c: fix a bug in which kstash would crash if + there were no /etc/krb5.conf + 2001-10-29 Jacques Vidrine * admin/get.c: fix a bug in which a reference to a data diff --git a/lib/hdb/mkey.c b/lib/hdb/mkey.c index 8e29f7656..81760a494 100644 --- a/lib/hdb/mkey.c +++ b/lib/hdb/mkey.c @@ -50,7 +50,8 @@ hdb_free_master_key(krb5_context context, hdb_master_key mkey) struct hdb_master_key_data *ptr; while(mkey) { krb5_kt_free_entry(context, &mkey->keytab); - krb5_crypto_destroy(context, mkey->crypto); + if (mkey->crypto) + krb5_crypto_destroy(context, mkey->crypto); ptr = mkey; mkey = mkey->next; free(ptr);