/* dispose of the data dangling from the corpse of a asymmetric key  */
static void asymmetric_key_destroy(struct key *key)
/* dispose of the data dangling from the corpse of a asymmetric key  */
static void asymmetric_key_destroy(struct key *key)
{
	struct asymmetric_key_subtype *subtype = asymmetric_key_subtype(key);
	struct asymmetric_key_ids *kids = key->payload.data[asym_key_ids];
	void *data = key->payload.data[asym_crypto];
	void *auth = key->payload.data[asym_auth];
	key->payload.data[asym_crypto] = NULL;
	key->payload.data[asym_subtype] = NULL;
	key->payload.data[asym_key_ids] = NULL;
	key->payload.data[asym_auth] = NULL;
	if (subtype) {
		subtype->destroy(data, auth);
		module_put(subtype->owner);
	}
	asymmetric_key_free_kids(kids);
}