/* x509_certificate_free - Free an X.509 certificate chain @cert: Pointer to the first certificate in the chain  */
void x509_certificate_chain_free(struct x509_certificate *cert)
/* x509_certificate_free - Free an X.509 certificate chain @cert: Pointer to the first certificate in the chain  */
void x509_certificate_chain_free(struct x509_certificate *cert)
{
	struct x509_certificate *next;
	while (cert) {
		next = cert->next;
		cert->next = NULL;
		x509_certificate_free(cert);
		cert = next;
	}
}