diff --git a/mozilla/security/nss/lib/certhigh/certvfy.c b/mozilla/security/nss/lib/certhigh/certvfy.c index 1f99d28797b..d65f72fbbfc 100644 --- a/mozilla/security/nss/lib/certhigh/certvfy.c +++ b/mozilla/security/nss/lib/certhigh/certvfy.c @@ -388,6 +388,9 @@ loser: return STAN_GetCERTCertificate(chain[1]); /* return the 2nd */ } } else { + if (chain[0]) { + CERT_DestroyCertificate(cert); + } PORT_SetError (SEC_ERROR_UNKNOWN_ISSUER); } return NULL;