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
This commit is contained in:
Jacques A. Vidrine
2001-12-05 14:41:47 +00:00
parent 094bb24377
commit 84ed3d7a7c
2 changed files with 7 additions and 1 deletions

View File

@@ -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);