Index: net/third_party/nss/ssl/sslnonce.c |
=================================================================== |
--- net/third_party/nss/ssl/sslnonce.c (revision 245705) |
+++ net/third_party/nss/ssl/sslnonce.c (working copy) |
@@ -114,11 +114,9 @@ |
{ |
int i; |
SSL_TRC(8, ("SSL: destroy sid: sid=0x%x cached=%d", sid, sid->cached)); |
- PORT_Assert((sid->references == 0)); |
+ PORT_Assert(sid->references == 0); |
+ PORT_Assert(sid->cached != in_client_cache); |
- if (sid->cached == in_client_cache) |
- return; /* it will get taken care of next time cache is traversed. */ |
- |
if (sid->version < SSL_LIBRARY_VERSION_3_0) { |
SECITEM_ZfreeItem(&sid->u.ssl2.masterKey, PR_FALSE); |
SECITEM_ZfreeItem(&sid->u.ssl2.cipherArg, PR_FALSE); |
@@ -222,9 +220,9 @@ |
SSL_TRC(8, ("SSL: Lookup1: sid=0x%x", sid)); |
- if (sid->expirationTime < now || !sid->references) { |
+ if (sid->expirationTime < now) { |
/* |
- ** This session-id timed out, or was orphaned. |
+ ** This session-id timed out. |
** Don't even care who it belongs to, blow it out of our cache. |
*/ |
SSL_TRC(7, ("SSL: lookup1, throwing sid out, age=%d refs=%d", |
@@ -232,11 +230,7 @@ |
*sidp = sid->next; /* delink it from the list. */ |
sid->cached = invalid_cache; /* mark not on list. */ |
- if (!sid->references) |
- ssl_DestroySID(sid); |
- else |
- ssl_FreeLockedSID(sid); /* drop ref count, free. */ |
- |
+ ssl_FreeLockedSID(sid); /* drop ref count, free. */ |
} else if (!memcmp(&sid->addr, addr, sizeof(PRIPv6Addr)) && /* server IP addr matches */ |
(sid->port == port) && /* server port matches */ |
/* proxy (peerID) matches */ |