Closed Bug 317975 Opened 19 years ago Closed 19 years ago

Memory leaks via PK11_ListCerts

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 291228

People

(Reporter: sfraser_bugs, Unassigned)

Details

(Keywords: memory-leak)

I'm seeing a lot of memory leaks via a call to PK11_ListCerts(). The leak stacks look like: PK11_ListCerts NSSTrustDomain_TraverseCertificates nssPKIObjectCollection_Traverse pk11ListCertCallback STAN_GetCERTCertificateName get_cert_instance nssCryptokiObject_Clone nssUTF8_Duplicate nss_ZAlloc PR_Calloc My guess is that the leak is in STAN_GetCERTCertificateName(): does 'instance' need to be destroyed? http://lxr.mozilla.org/mozilla/source/security/nss/lib/pki/pki3hack.c#693
Whiteboard: [kerh-coa]
Keywords: mlk
I think this is an NSS bug?
Assignee: kengert → nobody
Component: Security: PSM → Libraries
Product: Core → NSS
QA Contact: libraries
Whiteboard: [kerh-coa]
Version: Trunk → 3.0
Simon, is this a duplicate of bug 291228 ?
Simon seems right. I think STAN_GetCERTCertificateName should destroy 'instance' because fill_CERTCertificateFields, the other caller of get_cert_instance, destroys 'instance': char * STAN_GetCERTCertificateName(PLArenaPool *arenaOpt, NSSCertificate *c) { nssCryptokiInstance *instance = get_cert_instance(c); char *nickname; nickname = STAN_GetCERTCertificateNameForInstance(arenaOpt, c, instance); if (instance) { nssCryptokiObject_Destroy(instance); } return nickname; }
Nelson, this bug is indeed a duplicate of bug 291228. *** This bug has been marked as a duplicate of 291228 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.