Bug 764649: Always use the PORT_ZNew macro to create sslSessionID objects.
r=emaldona. Modified Files: sslcon.c sslsnce.c git-svn-id: svn://10.0.0.236/trunk@263947 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* $Id: sslcon.c,v 1.50 2012-04-25 14:50:12 gerv%gerv.net Exp $ */
|
||||
/* $Id: sslcon.c,v 1.51 2012-06-14 19:04:59 wtc%google.com Exp $ */
|
||||
|
||||
#include "nssrenam.h"
|
||||
#include "cert.h"
|
||||
@@ -2860,7 +2860,7 @@ ssl2_HandleServerHelloMessage(sslSocket *ss)
|
||||
SSL_GETPID(), ss->fd));
|
||||
(*ss->sec.uncache)(sid);
|
||||
ssl_FreeSID(sid);
|
||||
ss->sec.ci.sid = sid = (sslSessionID*) PORT_ZAlloc(sizeof(sslSessionID));
|
||||
ss->sec.ci.sid = sid = PORT_ZNew(sslSessionID);
|
||||
if (!sid) {
|
||||
goto loser;
|
||||
}
|
||||
@@ -3063,7 +3063,7 @@ ssl2_BeginClientHandshake(sslSocket *ss)
|
||||
}
|
||||
if (!sid) {
|
||||
sidLen = 0;
|
||||
sid = (sslSessionID*) PORT_ZAlloc(sizeof(sslSessionID));
|
||||
sid = PORT_ZNew(sslSessionID);
|
||||
if (!sid) {
|
||||
goto loser;
|
||||
}
|
||||
@@ -3489,7 +3489,7 @@ ssl2_HandleClientHelloMessage(sslSocket *ss)
|
||||
goto loser;
|
||||
}
|
||||
hit = 0;
|
||||
sid = (sslSessionID*) PORT_ZAlloc(sizeof(sslSessionID));
|
||||
sid = PORT_ZNew(sslSessionID);
|
||||
if (!sid) {
|
||||
goto loser;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* $Id: sslsnce.c,v 1.62 2012-06-11 02:38:30 emaldona%redhat.com Exp $ */
|
||||
/* $Id: sslsnce.c,v 1.63 2012-06-14 19:04:59 wtc%google.com Exp $ */
|
||||
|
||||
/* Note: ssl_FreeSID() in sslnonce.c gets used for both client and server
|
||||
* cache sids!
|
||||
@@ -534,7 +534,7 @@ ConvertToSID(sidCacheEntry * from,
|
||||
sslSessionID *to;
|
||||
uint16 version = from->version;
|
||||
|
||||
to = (sslSessionID*) PORT_ZAlloc(sizeof(sslSessionID));
|
||||
to = PORT_ZNew(sslSessionID);
|
||||
if (!to) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user