353902: klocwork bugs in stanpcertdb.c. r=nelson

This commit is contained in:
alexei.volkov.bugs%sun.com 2006-10-31 00:24:38 +00:00
parent 341b92ca26
commit 33f9b12c9f

View File

@ -92,6 +92,11 @@ SEC_DeletePermCertificate(CERTCertificate *cert)
NSSTrustDomain *td = STAN_GetDefaultTrustDomain();
NSSCertificate *c = STAN_GetNSSCertificate(cert);
if (c == NULL) {
/* error code is set */
return SECFailure;
}
/* get rid of the token instances */
nssrv = NSSCertificate_DeleteStoredObject(c, NULL);
@ -158,6 +163,11 @@ __CERT_AddTempCertToPerm(CERTCertificate *cert, char *nickname,
nssCertificateStoreTrace lockTrace = {NULL, NULL, PR_FALSE, PR_FALSE};
nssCertificateStoreTrace unlockTrace = {NULL, NULL, PR_FALSE, PR_FALSE};
if (c == NULL) {
/* error code is set */
return SECFailure;
}
context = c->object.cryptoContext;
if (!context) {
PORT_SetError(SEC_ERROR_ADDING_CERT);