diff options
author | jpierre%netscape.com <devnull@localhost> | 2003-01-30 02:59:35 +0000 |
---|---|---|
committer | jpierre%netscape.com <devnull@localhost> | 2003-01-30 02:59:35 +0000 |
commit | b03c93ba9ef035047745eb7cb88f7f7d0ecd979e (patch) | |
tree | a112c3a434c9bf1dd9663da28a492db1b1a1d55d /security/nss/lib/crmf/respcmn.c | |
parent | 77ce700510fbd665a1d48a2dbdb5864cb8a6a6e0 (diff) | |
download | nss-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.c | 29 |
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; |