Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: nss/mozilla/security/nss/lib/pki/pkibase.c

Issue 3135002: Update to NSS 3.12.7 and NSPR 4.8.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/mozilla/security/nss/lib/pki/pkibase.c
===================================================================
--- nss/mozilla/security/nss/lib/pki/pkibase.c (revision 55475)
+++ nss/mozilla/security/nss/lib/pki/pkibase.c (working copy)
@@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */
#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile: pkibase.c,v $ $Revision: 1.31 $ $Date: 2009/04/17 19:28:07 $";
+static const char CVS_ID[] = "@(#) $RCSfile: pkibase.c,v $ $Revision: 1.33 $ $Date: 2010/04/03 18:27:32 $";
#endif /* DEBUG */
#ifndef DEV_H
@@ -152,7 +152,7 @@
goto loser;
}
}
- PR_AtomicIncrement(&object->refCount);
+ PR_ATOMIC_INCREMENT(&object->refCount);
if (mark) {
nssArena_Unmark(arena, mark);
}
@@ -173,7 +173,7 @@
{
PRUint32 i;
PR_ASSERT(object->refCount > 0);
- if (PR_AtomicDecrement(&object->refCount) == 0) {
+ if (PR_ATOMIC_DECREMENT(&object->refCount) == 0) {
for (i=0; i<object->numInstances; i++) {
nssCryptokiObject_Destroy(object->instances[i]);
}
@@ -189,7 +189,7 @@
nssPKIObject *object
)
{
- PR_AtomicIncrement(&object->refCount);
+ PR_ATOMIC_INCREMENT(&object->refCount);
return object;
}
@@ -510,6 +510,11 @@
* */
}
bestdc = nssCertificate_GetDecoding(bestCert);
+ if (!bestdc) {
+ nssCertificate_Destroy(bestCert);
+ bestCert = nssCertificate_AddRef(c);
+ continue;
+ }
/* time */
if (bestdc->isValidAtTime(bestdc, time)) {
/* The current best cert is valid at time */
@@ -1247,7 +1252,9 @@
{
NSSTime *rvTime;
rvTime = (timeOpt) ? timeOpt : nss_ZNEW(NULL, NSSTime);
- rvTime->prTime = prTime;
+ if (rvTime) {
+ rvTime->prTime = prTime;
+ }
return rvTime;
}

Powered by Google App Engine
This is Rietveld 408576698