MIT Kerberos Documentation

krb5_free_error - Free an error allocated by krb5_read_error() or krb5_sendauth().

void krb5_free_error(krb5_context context, krb5_error * val)
param:

[in] context - Library context

[in] val - Error data structure to be freed

This function frees the contents of val and the structure itself.