Closed
Bug 93989
Opened 23 years ago
Closed 23 years ago
memory leak in SECMOD_AddModule()
Categories
(NSS :: Libraries, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
3.4
People
(Reporter: jeff, Assigned: rrelyea)
References
Details
(Keywords: memory-leak)
in security/nss/lib/pk11wrap/pk11util.c::SECMOD_AddModule(),
the call to _FindModule() returns a 'referenced' module. this
return value is discarded and hence the reference count is off
and the module gets leaked later during cleanup.
consider adding the following change:
#if 1//begin JLH fix
SECMODModule * pOldModule = SECMOD_FindModule(newModule->commonName);
if (pOldModule) {
/* _FindModule() increased the ref count, so we need to undo it. */
SECMOD_DestroyModule(pOldModule);
return SECWouldBlock;
/* module already exists. */
}
#else //the old way
if (SECMOD_FindModule(newModule->commonName)) {
return SECWouldBlock;
/* module already exists. */
}
#endif//end JLH fix
Comment 1•23 years ago
|
||
Need review of patch. thanks for the patch reporter.
Updated•23 years ago
|
Priority: -- → P2
Target Milestone: --- → 3.4
Assignee | ||
Comment 3•23 years ago
|
||
Fixed in NSS 3.4
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•