diff --git a/security/nss/lib/smime/cmsencode.c b/security/nss/lib/smime/cmsencode.c index 0b0eb1d2c20..8f14d42d68a 100644 --- a/security/nss/lib/smime/cmsencode.c +++ b/security/nss/lib/smime/cmsencode.c @@ -37,7 +37,7 @@ /* * CMS encoding. * - * $Id: cmsencode.c,v 1.5 2004-04-25 15:03:16 gerv%gerv.net Exp $ + * $Id: cmsencode.c,v 1.6 2006-06-08 22:01:02 nelson%bolyard.com Exp $ */ #include "cmslocal.h" @@ -563,8 +563,10 @@ NSS_CMSEncoder_Start(NSSCMSMessage *cmsg, rv = SECFailure; break; } - if (rv != SECSuccess) + if (rv != SECSuccess) { + PORT_Free(p7ecx); return NULL; + } /* Initialize the BER encoder. * Note that this will not encode anything until the first call to SEC_ASN1EncoderUpdate */