Closed Bug 1000609 Opened 11 years ago Closed 11 years ago

BlobSet does not free mData when it is destroyed

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

(Keywords: memory-leak, Whiteboard: [lsan][MemShrink:P2])

Attachments

(2 files)

Found while running crashtests under LSAN.
Whiteboard: [lsan] → [lsan][MemShrink]
Whiteboard: [lsan][MemShrink] → [lsan][MemShrink:P2]
This leak is caused by content/base/crashtests/xhr_abortinprogress.html
One way to fix the leak seems to be to add a dtor to BlobSet() that freed mData: ~BlobSet() { if (mData) { free(mData); } } What the test is doing is an XHR that is failing partway through, and so I guess the BlobSet just floats off into the ether somewhere. The actual BlobSet is being deleted somehow, but no flush or whatever occurs that frees the data.
The destruction of the BlobSet() is happening in nsXMLHttpRequest::ResetResponse(), which basically just deletes everything, so adding a dtor to BlobSet() seems like a reasonable approach.
Assignee: nobody → continuation
Summary: Leak in BlobSet::ExpandBufferSize → BlobSet does not free mData when it is destroyed
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: