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

Unified Diff: nss/mozilla/security/nss/lib/pk11wrap/pk11skey.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/pk11wrap/pk11skey.c
===================================================================
--- nss/mozilla/security/nss/lib/pk11wrap/pk11skey.c (revision 55475)
+++ nss/mozilla/security/nss/lib/pk11wrap/pk11skey.c (working copy)
@@ -217,7 +217,7 @@
PK11SlotInfo *slot;
PRBool freeit = PR_TRUE;
- if (PR_AtomicDecrement(&symKey->refCount) == 0) {
+ if (PR_ATOMIC_DECREMENT(&symKey->refCount) == 0) {
PK11SymKey *parent = symKey->parent;
symKey->parent = NULL;
@@ -279,7 +279,7 @@
PK11SymKey *
PK11_ReferenceSymKey(PK11SymKey *symKey)
{
- PR_AtomicIncrement(&symKey->refCount);
+ PR_ATOMIC_INCREMENT(&symKey->refCount);
return symKey;
}
@@ -1154,13 +1154,18 @@
CK_SESSION_HANDLE session;
CK_RV crv;
+ if (symKey == NULL) {
+ PORT_SetError( SEC_ERROR_INVALID_ARGS );
+ return SECFailure;
+ }
+
/* if this slot doesn't support the mechanism, go to a slot that does */
newKey = pk11_ForceSlot(symKey,type,CKA_ENCRYPT);
if (newKey != NULL) {
symKey = newKey;
}
- if ((symKey == NULL) || (symKey->slot == NULL)) {
+ if (symKey->slot == NULL) {
PORT_SetError( SEC_ERROR_NO_MODULE );
return SECFailure;
}

Powered by Google App Engine
This is Rietveld 408576698