Closed
Bug 139325
Opened 24 years ago
Closed 24 years ago
Leaking CERTCertificate references from nsNSSCertificate::GetChain
Categories
(Core Graveyard :: Security: UI, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: bryner, Assigned: KaiE)
References
Details
(Whiteboard: [adt1])
Attachments
(1 file, 2 obsolete files)
|
2.09 KB,
patch
|
bryner
:
review+
alecf
:
superreview+
scc
:
approval+
|
Details | Diff | Splinter Review |
The following code leaks:
while (cert) {
nsCOMPtr<nsIX509Cert> pipCert = new nsNSSCertificate(cert);
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("adding %s to chain\n", cert->nickname));
array->AppendElement(pipCert);
if (SECITEM_CompareItem(&cert->derIssuer, &cert->derSubject) == SECEqual)
break;
cert = CERT_FindCertIssuer(cert, PR_Now(), certUsageSSLClient);
}
because CERT_FindCertIssuer will addref the certificate before handing it back.
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•24 years ago
|
||
| Assignee | ||
Comment 2•24 years ago
|
||
Javi, can you please review?
| Assignee | ||
Comment 3•24 years ago
|
||
Shame on me, the previous patch introduced a double free for the first cert.
Attachment #80483 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•24 years ago
|
||
The previous patch didn't compile everywhere, because the existing goto crossed
the init location.
Attachment #80489 -
Attachment is obsolete: true
| Reporter | ||
Comment 5•24 years ago
|
||
Comment on attachment 80491 [details] [diff] [review]
Fixed goto init crossing
|cert| doesn't strictly need to be initialized to nsnull; remove it if you want
to. r=bryner.
Attachment #80491 -
Flags: review+
| Reporter | ||
Comment 6•24 years ago
|
||
With this patch applied, and the patch in bug 133584 applied, NSS shuts down
cleanly (verified by setting NSS_STRICT_SHUTDOWN) after bringing up the cert
manager and viewing a certificate.
| Assignee | ||
Comment 7•24 years ago
|
||
Brian, you also had the fix from 139349 in your tree, right?
Alec, can you please sr= ?
Comment 8•24 years ago
|
||
Comment on attachment 80491 [details] [diff] [review]
Fixed goto init crossing
r=javi
| Reporter | ||
Comment 9•24 years ago
|
||
kaie, yes, I have that fix in my tree as well.
Comment 10•24 years ago
|
||
Comment on attachment 80491 [details] [diff] [review]
Fixed goto init crossing
sr=alecf
Attachment #80491 -
Flags: superreview+
Comment 11•24 years ago
|
||
Update for Scott Putterman.
This bug is indeed related to the profile switching work that is taking place.
See comment #6
Note also that this bug blocks bug 125561
If the strategy is to try and get NSS to shutdown cleanly always, or at least
most of the time then this bug is needed.
| Assignee | ||
Comment 12•24 years ago
|
||
Checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 13•24 years ago
|
||
adt1.0.0+ (on ADT's behalf) approval for checkin on the 1.0 branch. Pls check
this in today, then add the fixed1.0.0 keyword.
Comment 15•24 years ago
|
||
Comment on attachment 80491 [details] [diff] [review]
Fixed goto init crossing
a=scc for checkin to the mozilla 1.0 branch
Attachment #80491 -
Flags: approval+
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•