mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
353902: klocwork bugs in stanpcertdb.c. r=nelson
This commit is contained in:
parent
341b92ca26
commit
33f9b12c9f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user