summaryrefslogtreecommitdiff
path: root/security/nss/lib/crmf/respcmn.c
diff options
context:
space:
mode:
authorjpierre%netscape.com <devnull@localhost>2003-01-30 02:59:35 +0000
committerjpierre%netscape.com <devnull@localhost>2003-01-30 02:59:35 +0000
commitb03c93ba9ef035047745eb7cb88f7f7d0ecd979e (patch)
treea112c3a434c9bf1dd9663da28a492db1b1a1d55d /security/nss/lib/crmf/respcmn.c
parent77ce700510fbd665a1d48a2dbdb5864cb8a6a6e0 (diff)
downloadnss-hg-b03c93ba9ef035047745eb7cb88f7f7d0ecd979e.tar.gz
Patch for memory leak . Bug 189976 . r=wtc
Diffstat (limited to 'security/nss/lib/crmf/respcmn.c')
-rw-r--r--security/nss/lib/crmf/respcmn.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/security/nss/lib/crmf/respcmn.c b/security/nss/lib/crmf/respcmn.c
index 871ece3ec..c4e1ba9cc 100644
--- a/security/nss/lib/crmf/respcmn.c
+++ b/security/nss/lib/crmf/respcmn.c
@@ -81,24 +81,17 @@ CMMF_DestroyCertRepContent(CMMFCertRepContent *inCertRepContent)
PORT_Assert(inCertRepContent != NULL);
if (inCertRepContent != NULL && inCertRepContent->poolp != NULL) {
- if (!inCertRepContent->isDecoded) {
- if (inCertRepContent->response != NULL) {
- for (i=0; inCertRepContent->response[i] != NULL; i++) {
- certKeyPair = inCertRepContent->response[i]->certifiedKeyPair;
- if (certKeyPair != NULL &&
- certKeyPair->certOrEncCert.choice == cmmfCertificate &&
- certKeyPair->certOrEncCert.cert.certificate != NULL) {
- CERT_DestroyCertificate
- (certKeyPair->certOrEncCert.cert.certificate);
- }
- }
- }
- if (inCertRepContent->caPubs != NULL) {
- for (i=0; inCertRepContent->caPubs[i] != NULL; i++) {
- CERT_DestroyCertificate(inCertRepContent->caPubs[i]);
- }
- }
- }
+ if (inCertRepContent->response != NULL) {
+ for (i=0; inCertRepContent->response[i] != NULL; i++) {
+ certKeyPair = inCertRepContent->response[i]->certifiedKeyPair;
+ if (certKeyPair != NULL &&
+ certKeyPair->certOrEncCert.choice == cmmfCertificate &&
+ certKeyPair->certOrEncCert.cert.certificate != NULL) {
+ CERT_DestroyCertificate
+ (certKeyPair->certOrEncCert.cert.certificate);
+ }
+ }
+ }
PORT_FreeArena(inCertRepContent->poolp, PR_TRUE);
}
return SECSuccess;