Closed Bug 1187410 Opened 8 years ago Closed 8 years ago
Interface::New Instance() leaks a string
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.)
I haven't done a full try run yet, but this seems pretty benign.
Attachment #8638718 - Flags: review?(mrbkap)
Attachment #8638718 - Flags: review?(mrbkap) → review+
You need to log in before you can comment on or make changes to this bug.