if (sec->localCert) { CERT_DestroyCertificate(sec->localCert); sec->localCert = NULL; }
ssl_DestroySecurityInfo(sslSecurityInfo *sec){    if (sec != 0) {	/* Destroy MAC */	if (sec->hash && sec->hashcx) {	    (*sec->hash->destroy)(sec->hashcx, PR_TRUE);	    sec->hashcx = 0;	}	SECITEM_ZfreeItem(&sec->sendSecret, PR_FALSE);	SECITEM_ZfreeItem(&sec->rcvSecret, PR_FALSE);	/* Destroy ciphers */	if (sec->destroy) {	    (*sec->destroy)(sec->readcx, PR_TRUE);	    (*sec->destroy)(sec->writecx, PR_TRUE);	} else {	    PORT_Assert(sec->readcx == 0);	    PORT_Assert(sec->writecx == 0);	}	sec->readcx = 0;	sec->writecx = 0;	/* etc. */	PORT_ZFree(sec->writeBuf.buf, sec->writeBuf.space);	sec->writeBuf.buf = 0;	if (sec->peerCert) {	    CERT_DestroyCertificate(sec->peerCert);	    sec->peerCert = NULL;	}	if (sec->peerKey) {	    SECKEY_DestroyPublicKey(sec->peerKey);	    sec->peerKey = NULL;	}	PORT_ZFree(sec->ci.sendBuf.buf, sec->ci.sendBuf.space);	if (sec->ci.sid != NULL) {	    ssl_FreeSID(sec->ci.sid);	}	PORT_ZFree(sec, sizeof *sec);    }}