Closed Bug 95668 Opened 23 years ago Closed 23 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: 23 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.

Attachment

General

Creator:
Created:
Updated:
Size: