fix cert leak found by client auth

This commit is contained in:
ian.mcgreer%sun.com 2002-02-01 18:18:13 +00:00
Родитель 677076a9bb
Коммит f2b84b4779
1 изменённых файлов: 1 добавлений и 11 удалений

Просмотреть файл

@ -425,17 +425,7 @@ loser:
/* need to dupe since caller expects new cert */
return CERT_DupCertificate(cert);
} else {
CERTCertificate *rvc;
/* XXX hack - if this is the only instance, return it, otherwise
* the cert came out of the cache or a crypto context, in
* which case it needs to be duped
*/
if (!chain[1]->decoding) {
return STAN_GetCERTCertificate(chain[1]);
} else {
rvc = STAN_GetCERTCertificate(chain[1]);
return CERT_DupCertificate(rvc);
}
return STAN_GetCERTCertificate(chain[1]);
}
} else {
PORT_SetError (SEC_ERROR_UNKNOWN_ISSUER);