Closed
Bug 94113
Opened 23 years ago
Closed 23 years ago
memory leak of prlog.c of all PRLogModuleInfo structures
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
People
(Reporter: jeff, Assigned: wtc)
Details
(Keywords: memory-leak)
there is no mechanism for freeing any of the PRLogModuleInfo structures either individually or when the log file is cleaned up. hence, they are all leaked. consider adding something like the following to the bottom of _PR_LogCleanup() in nsprpub/pr/src/io/prlog.c { PRLogModuleInfo * lm = logModules; while (lm) { PRLogModuleInfo * next = lm->next; if (lm->name) PR_Free((/*const*/ char *)lm->name); PR_Free(lm); lm = next; } logModules = NULL; } or creating a special LogModule cleanup function and calling from PR_Cleanup() in nsprpub/pr/src/misc/prinit.c (see the XXX comment near the bottom of the function). granted this only affects debug builds (thus the reduced severity), but it does generate extra noise for the leak-testing tools.
Updated•23 years ago
|
Assignee | ||
Comment 1•23 years ago
|
||
*** This bug has been marked as a duplicate of 54353 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•