Closed Bug 95668 Opened 22 years ago Closed 22 years ago

memory leak in pruthr.c

Categories

(NSPR :: NSPR, defect, P2)

4.1.2
x86
Windows 2000

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jeff, Assigned: wtc)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

there are a bunch of static variables that are initialized
in _PR_InitThreads() that are never freed/destroyed.

consider adding the following to 
nsprpub/pr/src/threads/combined/pruthr.c and calling it 
from PR_Cleanup() (see the "XXX: ..." comment near the bottom).


#if 1//begin JLH added ()
void _PR_CleanupThreads(void)
{
	if (_pr_terminationCVLock)
	{
		PR_DestroyLock(_pr_terminationCVLock);
		_pr_terminationCVLock = NULL;
	}
	if (_pr_activeLock)
	{
		PR_DestroyLock(_pr_activeLock);
		_pr_activeLock = NULL;
	}
	if (_pr_primordialExitCVar)
	{
		PR_DestroyCondVar(_pr_primordialExitCVar);
		_pr_primordialExitCVar = NULL;
	}
	if (_pr_deadQLock)
	{
		PR_DestroyLock(_pr_deadQLock);
		_pr_deadQLock = NULL;
	}
	// TODO see if _pr_dead{Native,User}Q need to be deleted
}
#endif//end JLH added ()
Dude you kick ass :) Nuff said :)
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: mlk, patch, review
Fix checked in on the tip of NSPR.
Status: NEW → RESOLVED
Closed: 22 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 4.2
Blocks: 129902
You need to log in before you can comment on or make changes to this bug.