Reported by Red Hat internal covscan
leaked_storage: Variable "princ" going out of scope leaks the storage it points to.
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(*error_string) = talloc_asprintf(cred, "failed to unparse principal from ccache: %s\n",
smb_get_krb5_error_message(ccache->smb_krb5_context->krb5_context,
ret, cred));
+ krb5_free_principal(ccache->smb_krb5_context->krb5_context, princ);
return ret;
}