Closed Bug 84401 Opened 23 years ago Closed 23 years ago

PrefEnumCallback leaks strings

Categories

(Core :: Internationalization, defect, P2)

All
Linux
defect

Tracking

()

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: dbaron, Assigned: ftang)

References

Details

(Keywords: intl, memory-leak, top-memory-leak, Whiteboard: [PDT+]wait for tree open to check in .)

Attachments

(2 files)

The changes made by bstell in revision 1.140 of nsFontMetricsGTK.cpp for bug
67732 and bug 69139 cause PrefEnumCallback to leak the string |value| whenever
|name.Equals(value)|.  This is causing rather significant leaks.
Oops, meant to assign to bstell.
Assignee: nhotta → bstell
Keywords: mlk, topmlk
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.2
Priority: -- → P1
I believe dbaron mean that the value is not free from block start from 
3304   if ((value) && (!name.Equals(value))) {

we should add a 
if(value) {
 nsMemory::Free(value);
 value = nsnull;
}

right before return.

  
bstell is overload. mark it moz0.9.2 P2 and move it to ftang
Priority: P1 → P2
bstell is overload. mark it moz0.9.2 P2 and move it to ftang
Assignee: bstell → ftang
Status: ASSIGNED → NEW
Keywords: intl
pdt+ base on 6/11 pdt meeting.
Whiteboard: [PDT+]
                                                                              
dbaron@fas.harvard.edu (David Baron)
can you review the patch?
Status: NEW → ASSIGNED
That patch compares |name| to |value| after setting |value| to |nsnull|.  It 
would be easier to just use nsXPIDLCString (and better proofed against future 
changes).
r=dbaron, although you should probably also remove the explicit nulling of
|value| that was right after the two calls to |nsMemory::Free| that you removed.
sr=kin@netscape.com with the change that dbaron suggested.
Whiteboard: [PDT+] → [PDT+]r=dbaron sr=kin need a=
*** Bug 83748 has been marked as a duplicate of this bug. ***
ftang, what's up? can we get this checked in?
I am waiting for a=
a=dbaron for trunk checkin (on behalf of drivers), assuming you make the change
requested above.

In general, though, if you want a=, please email drivers@mozilla.org asking for it.
Whiteboard: [PDT+]r=dbaron sr=kin need a= → [PDT+]wait for tree open to check in .
fixed and check in 
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Changing QA contact to ftang@netscape.com for now.  Frank, can you verify this
within development or provide IQA with a test case?  Thanks.
QA Contact: andreasb → ftang
verify
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: