memory leak in prlayer.c

RESOLVED FIXED in 4.2

Status

NSPR
NSPR
P2
major
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: Jeff Hostetler, Assigned: Wan-Teh Chang)

Tracking

({mlk})

4.1.2
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
the identity_cache is not deleted.  consider adding the following function
to nsprpub/pr/src/io/prlayer.c and calling it from PR_Cleanup().

void _PR_CleanupLayerCache(void)
{
	if (identity_cache.ml)
	{
		PR_DestroyLock(identity_cache.ml);
		identity_cache.ml = NULL;
	}

	if (identity_cache.name)
	{
		int k;
		for (k=0; k<identity_cache.length; k++)
			if (identity_cache.name[k])
				PR_DELETE(identity_cache.name[k]);

		PR_DELETE(identity_cache.name);
		identity_cache.name = NULL;
	}
}

Comment 1

17 years ago
Adding keywords...thanks for the patch.
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: mlk, patch, review
(Assignee)

Comment 2

17 years ago
Created attachment 47574 [details] [diff] [review]
Proposed patch, based on the suggestion of jeff@NerdOne.com.
(Assignee)

Comment 3

17 years ago
Fix checked in on the tip of NSPR.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 4.2
(Assignee)

Updated

16 years ago
Blocks: 129902
You need to log in before you can comment on or make changes to this bug.