Bug 557888 - nsCertAlreadyExists always leaks unused arena, r=kaie

--HG--
extra : rebase_source : 33db7306106d05a695da3928648f4540fb673eb0
This commit is contained in:
timeless@mozdev.org 2010-04-07 13:24:00 -07:00
parent b92bf2348e
commit 5273a85a73

View File

@ -2214,15 +2214,9 @@ static PRBool
nsCertAlreadyExists(SECItem *derCert)
{
CERTCertDBHandle *handle = CERT_GetDefaultCertDB();
PRArenaPool *arena;
CERTCertificate *cert;
PRBool retVal = PR_FALSE;
arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
NS_ASSERTION(arena, "Couldn't allocate an arena!");
if (!arena)
return PR_FALSE; //What else could we return?
cert = CERT_FindCertByDERCert(handle, derCert);
if (cert) {
if (cert->isperm && !cert->nickname && !cert->emailAddr) {