Closed
Bug 1187410
Opened 9 years ago
Closed 9 years ago
XPCNativeInterface::NewInstance() leaks a string
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
(Blocks 1 open bug)
Details
(Keywords: memory-leak, Whiteboard: [MemShrink])
Attachments
(1 file)
1.59 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
When NewInstance() finds something that isn't usable in the child process it generates a console message using the following code:
char* intfNameChars;
aInfo->GetName(&intfNameChars);
However, it does not free |intfNameChars|, so we leak. The solution is to call GetNameShared() instead of GetName() which does not create copy of the string. |aInfo| should be alive for a long as we need the string (eg the next line) so that should be okay.
This was found by LSan, and shows up in various e10s tests, mostly bc, like toolkit/components/perfmonitoring/tests/browser/ and toolkit/components/addoncompat/tests/browser/.
(This is a regression from bug 997325.)
Assignee | ||
Comment 1•9 years ago
|
||
I haven't done a full try run yet, but this seems pretty benign.
Attachment #8638718 -
Flags: review?(mrbkap)
Updated•9 years ago
|
Attachment #8638718 -
Flags: review?(mrbkap) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Assignee | ||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•