Only clean keys that had their schedule setup.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23568 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-08-16 23:04:34 +00:00
parent 7d80d78c9c
commit 7260146234

View File

@@ -3680,10 +3680,10 @@ static void
free_key_data(krb5_context context, struct key_data *key,
struct encryption_type *et)
{
if (et->keytype->cleanup)
(*et->keytype->cleanup)(context, key);
krb5_free_keyblock(context, key->key);
if(key->schedule) {
if (et->keytype->cleanup)
(*et->keytype->cleanup)(context, key);
memset(key->schedule->data, 0, key->schedule->length);
krb5_free_data(context, key->schedule);
}