Closed
Bug 392609
Opened 17 years ago
Closed 17 years ago
InitUserID() leaks ID string
Categories
(Toolkit :: Crash Reporting, defect)
Toolkit
Crash Reporting
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: ted)
References
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
1.21 KB,
patch
|
benjamin
:
review+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
463 nsCAutoString id_str(id.ToString()); Leaks. The header docs on ToString() say: Caller should free string. Note that the best way to fix this depends on what happens in bug 392526.
Flags: blocking1.9?
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9-
Ted: Could you have a look at this, should be an easy fix.
Assignee: nobody → ted.mielczarek
Comment 3•17 years ago
|
||
Comment on attachment 286006 [details] [diff] [review] PR_Free the pointer You want nsAdoptingCString, I think.
Attachment #286006 -
Flags: review?(benjamin) → review-
Assignee | ||
Comment 4•17 years ago
|
||
is that true? In bug 392526 bz said: "2) The function uses an allocator which is not necessarily compatible with XPCOM strings (though in the common case it is). As a result, Adopt() of this string is wrong."
Comment 5•17 years ago
|
||
well shoot, we shoulda fixed bug 331165 already :-( You should be able to skip the nsCAutostring copy and do something like nsDependentCString id_str(id_cstr);
Assignee | ||
Comment 6•17 years ago
|
||
Same thing, but using nsDependentCString.
Attachment #286006 -
Attachment is obsolete: true
Attachment #286750 -
Flags: review?(benjamin)
Updated•17 years ago
|
Attachment #286750 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 7•17 years ago
|
||
Comment on attachment 286750 [details] [diff] [review] + nsDependentCString Looking for approval, just a simple leak fix.
Attachment #286750 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #286750 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → ted.mielczarek
Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•