Closed
Bug 251267
Opened 21 years ago
Closed 21 years ago
Memory leak in XRemoteService.cpp
Categories
(Core Graveyard :: X-remote, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pkwarren, Assigned: pkwarren)
Details
(Keywords: memory-leak)
Attachments
(1 file)
818 bytes,
patch
|
blizzard
:
review+
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
I'm seeing a memory leak in XRemoteService.cpp running under Valgrind.
XRemoteService::GetProfileName calls nsProfile::GetCurrentProfile, which returns
a profile string allocated with ToNewUnicode(). This string is never free'd in
the XRemoteService code.
Assignee | ||
Comment 1•21 years ago
|
||
I have verified this fixes the leak by running Mozilla before/after in
Valgrind.
Assignee | ||
Comment 2•21 years ago
|
||
Here is the stack from Valgrind:
16 bytes in 1 blocks are definitely lost in loss record 40 of 341
at 0x1B9046D0: malloc (vg_replace_malloc.c:109)
by 0x1B9E08AF: PR_Malloc (prmem.c:436)
by 0x1BE76B3B: nsMemoryImpl::Alloc(unsigned) (nsMemoryImpl.cpp:325)
by 0x8080D62: nsMemory::Alloc(unsigned) (nsMemory.cpp:87)
by 0x80751E5: unsigned short* AllocateStringCopy<nsAString, unsigned
short>(nsAString const&, unsigned short*) (nsReadableUtils.cpp:310)
by 0x8073509: ToNewUnicode(nsAString const&) (nsReadableUtils.cpp:369)
by 0x1D11BC39: nsProfileAccess::GetCurrentProfile(unsigned short**)
(nsProfileAccess.cpp:609)
by 0x1D10BFDF: nsProfile::GetCurrentProfile(unsigned short**)
(nsProfile.cpp:1145)
by 0x1DDA4FAB: XRemoteService::GetProfileName(nsACString&)
(XRemoteService.cpp:1071)
by 0x1DDA2966: XRemoteService::CreateProxyWindow() (XRemoteService.cpp:522)
Assignee | ||
Updated•21 years ago
|
Attachment #153083 -
Flags: superreview?(blizzard)
Attachment #153083 -
Flags: review?(blizzard)
Updated•21 years ago
|
Attachment #153083 -
Flags: superreview?(blizzard)
Attachment #153083 -
Flags: superreview+
Attachment #153083 -
Flags: review?(blizzard)
Attachment #153083 -
Flags: review+
Assignee | ||
Updated•21 years ago
|
Flags: blocking1.8a2?
Assignee | ||
Updated•21 years ago
|
Flags: blocking1.8a2?
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•21 years ago
|
||
Fixed.
Checking in XRemoteService.cpp;
/cvsroot/mozilla/xpfe/components/xremote/src/XRemoteService.cpp,v <--
XRemoteService.cpp
new revision: 1.42; previous revision: 1.41
done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•