| 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, ¶m, 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, ¶m, pwitem);
|
| if (cryptoMechType == CKM_INVALID_MECHANISM) {
|
| PORT_Free(result);
|
| + SECITEM_FreeItem(param,PR_TRUE);
|
| return NULL;
|
| }
|
| } else {
|
|
|