From 7ecfde73d028fea741eeef1e5ee86c39fdbe34e0 Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Thu, 14 Jun 2012 19:04:59 +0000 Subject: [PATCH] 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 --- mozilla/security/nss/lib/ssl/sslcon.c | 8 ++++---- mozilla/security/nss/lib/ssl/sslsnce.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/security/nss/lib/ssl/sslcon.c b/mozilla/security/nss/lib/ssl/sslcon.c index 07b5871f4ea..166cbdbc661 100644 --- a/mozilla/security/nss/lib/ssl/sslcon.c +++ b/mozilla/security/nss/lib/ssl/sslcon.c @@ -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; } diff --git a/mozilla/security/nss/lib/ssl/sslsnce.c b/mozilla/security/nss/lib/ssl/sslsnce.c index 3769461f959..b3f517d3370 100644 --- a/mozilla/security/nss/lib/ssl/sslsnce.c +++ b/mozilla/security/nss/lib/ssl/sslsnce.c @@ -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; }