summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaie%kuix.de <devnull@localhost>2006-09-26 18:58:22 +0000
committerkaie%kuix.de <devnull@localhost>2006-09-26 18:58:22 +0000
commitfbb8233e1a4022cef65ef1df593dc595e6c1acd3 (patch)
tree7a80e870a376d27d24eaac200310ae48f60f7dd3
parent3bb729bc273b145977253da2ef72f04b8000e0b8 (diff)
downloadnss-hg-fbb8233e1a4022cef65ef1df593dc595e6c1acd3.tar.gz
Bug 353422, Klocwork bugs in nss/lib/crmf
r=nelson, r=rrelyea Patch inspired by Nelson
-rw-r--r--security/nss/lib/crmf/respcmn.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/security/nss/lib/crmf/respcmn.c b/security/nss/lib/crmf/respcmn.c
index 54fbb3faf..14de15db8 100644
--- a/security/nss/lib/crmf/respcmn.c
+++ b/security/nss/lib/crmf/respcmn.c
@@ -267,14 +267,14 @@ CMMF_DestroyCertifiedKeyPair(CMMFCertifiedKeyPair *inCertKeyPair)
PORT_Assert(inCertKeyPair != NULL);
if (inCertKeyPair != NULL) {
cmmf_DestroyCertOrEncCert(&inCertKeyPair->certOrEncCert, PR_FALSE);
+ if (inCertKeyPair->privateKey) {
+ crmf_destroy_encrypted_value(inCertKeyPair->privateKey, PR_TRUE);
+ }
+ if (inCertKeyPair->derPublicationInfo.data) {
+ PORT_Free(inCertKeyPair->derPublicationInfo.data);
+ }
+ PORT_Free(inCertKeyPair);
}
- if (inCertKeyPair->privateKey) {
- crmf_destroy_encrypted_value(inCertKeyPair->privateKey, PR_TRUE);
- }
- if (inCertKeyPair->derPublicationInfo.data) {
- PORT_Free(inCertKeyPair->derPublicationInfo.data);
- }
- PORT_Free(inCertKeyPair);
return SECSuccess;
}