summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2001-08-28 18:37:55 +0000
committerwtc%netscape.com <devnull@localhost>2001-08-28 18:37:55 +0000
commit569e1981b7f664b2fc5d2d3e6b8a99eb38aaa100 (patch)
tree0a5ca6da0190c22891d1be79c577f95af97f48c0
parent44297deba2856d7aeb300d33a046012d9d07c893 (diff)
downloadnspr-hg-569e1981b7f664b2fc5d2d3e6b8a99eb38aaa100.tar.gz
Bugzilla bug 54353: free the log modules at NSPR cleanup. Thanks to
jeff@NerdOne.com for the patch.
-rw-r--r--pr/src/io/prlog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c
index f541a036..16f68823 100644
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -261,6 +261,8 @@ void _PR_InitLog(void)
void _PR_LogCleanup(void)
{
+ PRLogModuleInfo *lm = logModules;
+
PR_LogFlush();
#ifdef _PR_USE_STDIO_FOR_LOGGING
@@ -272,6 +274,14 @@ void _PR_LogCleanup(void)
PR_Close(logFile);
}
#endif
+
+ while (lm != NULL) {
+ PRLogModuleInfo *next = lm->next;
+ PR_Free((/*const*/ char *)lm->name);
+ PR_Free(lm);
+ lm = next;
+ }
+ logModules = NULL;
}
static void _PR_SetLogModuleLevel( PRLogModuleInfo *lm )