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

Unified Diff: nss/mozilla/security/nss/lib/pkcs7/p7local.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/pkcs7/p7local.c
===================================================================
--- nss/mozilla/security/nss/lib/pkcs7/p7local.c (revision 55475)
+++ nss/mozilla/security/nss/lib/pkcs7/p7local.c (working copy)
@@ -40,7 +40,7 @@
* encoding/creation side *and* the decoding/decryption side. Anything
* else should be static routines in the appropriate file.
*
- * $Id: p7local.c,v 1.13 2008/05/30 03:39:46 nelson%bolyard.com Exp $
+ * $Id: p7local.c,v 1.14 2010/03/15 07:25:14 nelson%bolyard.com Exp $
*/
#include "p7local.h"
@@ -104,8 +104,8 @@
SECOidTag algtag;
void *ciphercx;
CK_MECHANISM_TYPE cryptoMechType;
- SECItem *param;
PK11SlotInfo *slot;
+ SECItem *param = NULL;
result = (struct sec_pkcs7_cipher_object*)
PORT_ZAlloc (sizeof(struct sec_pkcs7_cipher_object));
@@ -127,6 +127,7 @@
cryptoMechType = PK11_GetPBECryptoMechanism(algid, &param, pwitem);
if (cryptoMechType == CKM_INVALID_MECHANISM) {
PORT_Free(result);
+ SECITEM_FreeItem(param,PR_TRUE);
return NULL;
}
} else {
@@ -178,11 +179,11 @@
{
sec_PKCS7CipherObject *result;
void *ciphercx;
- SECItem *param;
SECStatus rv;
CK_MECHANISM_TYPE cryptoMechType;
+ PK11SlotInfo *slot;
+ SECItem *param = NULL;
PRBool needToEncodeAlgid = PR_FALSE;
- PK11SlotInfo *slot;
result = (struct sec_pkcs7_cipher_object*)
PORT_ZAlloc (sizeof(struct sec_pkcs7_cipher_object));
@@ -202,6 +203,7 @@
cryptoMechType = PK11_GetPBECryptoMechanism(algid, &param, pwitem);
if (cryptoMechType == CKM_INVALID_MECHANISM) {
PORT_Free(result);
+ SECITEM_FreeItem(param,PR_TRUE);
return NULL;
}
} else {

Powered by Google App Engine
This is Rietveld 408576698