if (c->cert_chain != NULL) sk_X509_pop_free(c->cert_chain,X509_free);
void ssl_cert_free(CERT *c)	{	int i;	if(c == NULL)	    return;	i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT);#ifdef REF_PRINT	REF_PRINT("CERT",c);#endif	if (i > 0) return;#ifdef REF_CHECK	if (i < 0)		{		fprintf(stderr,"ssl_cert_free, bad reference count\n");		abort(); /* ok */		}#endif#ifndef NO_RSA	if (c->rsa_tmp) RSA_free(c->rsa_tmp);#endif#ifndef NO_DH	if (c->dh_tmp) DH_free(c->dh_tmp);#endif	for (i=0; i<SSL_PKEY_NUM; i++)		{		if (c->pkeys[i].x509 != NULL)			X509_free(c->pkeys[i].x509);		if (c->pkeys[i].privatekey != NULL)			EVP_PKEY_free(c->pkeys[i].privatekey);#if 0		if (c->pkeys[i].publickey != NULL)			EVP_PKEY_free(c->pkeys[i].publickey);#endif		}	if (c->cert_chain != NULL)		sk_X509_pop_free(c->cert_chain,X509_free);	Free(c);	}